/* ==========================================================================
   BLOG - Magi SAF-T
   Covers: blog index page + individual article pages
   ========================================================================== */

:root {
    --blog-navy-deep: #071828;
    --blog-navy: #0a2540;
    --blog-navy-mid: #0f3d5c;
    --blog-blue: #1a5a8e;
    --blog-teal: #00cec9;
    --blog-sky: #5ec8ff;
    --blog-amber: #f6a93b;
    --blog-purple: #6c5ce7;
}

/* ────────────────────────────────────────────────
   SHARED DARK CHROME (index hero, article header, bottom CTA)
   Same navy ramp + dot-grid texture as the article thumbnail artwork
   (static/images/thumbnails/*) - this chrome is meant to read as a
   continuation of that artwork, not a different banner style.
   ──────────────────────────────────────────────── */
.blog-hero,
.blog-article-header,
.blog-bottom-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom,
        var(--blog-navy-deep) 0%,
        var(--blog-navy) 30%,
        var(--blog-navy-mid) 65%,
        var(--blog-navy) 100%);
}

.blog-hero::before,
.blog-article-header::before,
.blog-bottom-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}

/* ────────────────────────────────────────────────
   BEACON - the signature mark. Four rings in colors this site already
   defines as its accent spectrum (base.css --accent-teal/--primary-blue/
   --accent-purple/--accent-gold, otherwise unused anywhere) plus a slow
   rotating conic sweep through the same spectrum for real spiral motion -
   it reads as a legend of the brand's own palette, turned up, not an
   invented rainbow.
   ──────────────────────────────────────────────── */
@keyframes blog-beacon-pulse {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.1); }
}

@keyframes blog-beacon-breathe {
    0%, 100% { transform: scale(1);     opacity: 0.95; }
    50%      { transform: scale(1.1);  opacity: 0.78; }
}

@keyframes blog-beacon-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.blog-beacon {
    position: relative;
    flex-shrink: 0;
}

.blog-beacon-spin {
    position: absolute;
    inset: -5%;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        rgba(0, 206, 201, 0.85),
        rgba(30, 127, 207, 0.8),
        rgba(108, 92, 231, 0.8),
        rgba(246, 169, 59, 0.85),
        rgba(0, 206, 201, 0.85));
    -webkit-mask: radial-gradient(circle, transparent 61%, #000 64%, #000 70%, transparent 73%);
            mask: radial-gradient(circle, transparent 61%, #000 64%, #000 70%, transparent 73%);
    animation: blog-beacon-spin 16s linear infinite;
}

.blog-beacon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.blog-beacon-ring--teal {
    border-color: rgba(0, 206, 201, 0.65);
    box-shadow: 0 0 18px rgba(0, 206, 201, 0.3);
}

.blog-beacon-ring--blue {
    inset: 10%;
    border-color: rgba(30, 127, 207, 0.6);
    box-shadow: 0 0 18px rgba(30, 127, 207, 0.3);
}

.blog-beacon-ring--purple {
    inset: 20%;
    border-color: rgba(108, 92, 231, 0.6);
    box-shadow: 0 0 18px rgba(108, 92, 231, 0.28);
}

.blog-beacon-ring--amber {
    inset: 30%;
    border-color: rgba(246, 169, 59, 0.7);
    box-shadow: 0 0 20px rgba(246, 169, 59, 0.35);
    animation: blog-beacon-pulse 3.2s ease-in-out infinite;
}

.blog-beacon-core {
    position: absolute;
    inset: 39%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(94,200,255,0.26), transparent 72%);
    box-shadow:
        0 0 46px 12px rgba(0, 180, 220, 0.26),
        0 0 80px 24px rgba(108, 92, 231, 0.16);
}

.blog-beacon-logo {
    width: 42%;
    height: auto;
    opacity: 0.95;
    animation: blog-beacon-breathe 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .blog-beacon-ring--amber,
    .blog-beacon-logo,
    .blog-beacon-spin { animation: none; }
}

.blog-beacon--lg { width: 290px; height: 290px; }
.blog-beacon--sm { width: 150px; height: 150px; }

.blog-beacon--sm .blog-beacon-ring { border-width: 2px; }
.blog-beacon--sm .blog-beacon-spin { display: none; }

/* ── INDEX HERO ── */
.blog-hero {
    padding: 4.5rem 0 4rem;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.blog-hero-text {
    max-width: 600px;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    margin-bottom: 1.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(10,37,64,0.88), rgba(26,90,142,0.88));
    border: 1px solid rgba(255,255,255,0.15);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-hero-title {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.25rem;
    line-height: 1.18;
}

.blog-hero-title .blog-hero-accent {
    display: block;
    color: var(--blog-amber);
}

.blog-hero-subtitle {
    font-size: 1.0625rem;
    color: rgba(255,255,255,0.68);
    max-width: 520px;
    line-height: 1.7;
}

@media (max-width: 760px) {
    .blog-hero-grid .blog-beacon { display: none; }
}

/* ────────────────────────────────────────────────
   BLOG CARD THUMBNAIL
   The thumbnail artwork is always exported at 1200x627 - sizing this
   wrapper to the same ratio (instead of a fixed pixel height) means
   object-fit:cover never has to crop it, at any card width.
   ──────────────────────────────────────────────── */
.blog-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 627;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    line-height: 0;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card-thumb::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blog-teal), var(--blog-blue), var(--blog-purple), var(--blog-amber));
    opacity: 0.85;
}

.blog-card-thumb--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(135deg, var(--blog-navy-deep), var(--blog-navy-mid));
    background-size: 22px 22px, 100% 100%;
}

.blog-card-thumb-mark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(94,200,255,0.26), transparent 72%);
    box-shadow: 0 0 36px 10px rgba(0, 180, 220, 0.2);
}

.blog-card-thumb-mark img {
    width: 44%;
    height: auto;
    opacity: 0.92;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.03);
}

.blog-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

/* ────────────────────────────────────────────────
   ARTICLE HEADER - slim wayfinding bar, not a second hero.
   The bottom spectrum rule is the same gradient the beacon cycles
   through, used here as a flat "signature" seam into the thumbnail.
   ──────────────────────────────────────────────── */
.blog-article-header {
    padding: 1.6rem 0 1.5rem;
}

.blog-article-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blog-teal), var(--blog-blue), var(--blog-purple), var(--blog-amber));
    opacity: 0.8;
}

.blog-article-header .container {
    position: relative;
    z-index: 1;
}

.blog-article-header .blog-beacon {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    transform: translateY(-50%);
}

@media (max-width: 860px) {
    .blog-article-header .blog-beacon { display: none; }
}

/* ── ARTICLE THUMBNAIL (below header) ──
   Only renders for plain articles now - the sp-hero ones (thumb_section
   block overridden empty) skip this, since showing the same headline
   twice (once baked into this image, once as real text in sp-hero) was
   pure duplication. Capped below its native 1200px width so it never
   gets upscaled past its own resolution on wide screens. */
.blog-article-thumb-section {
    background: #eef2f6;
    padding: 2.5rem 0 0;
}

.blog-article-thumb-img {
    display: block;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    border-radius: 10px;
    aspect-ratio: 1200 / 627;
    object-fit: cover;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.10);
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-breadcrumb a {
    color: rgba(255,255,255,0.68);
    text-decoration: none;
    transition: color 0.15s;
    flex-shrink: 0;
}

.blog-breadcrumb a:hover { color: #fff; }

.blog-breadcrumb i {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.blog-breadcrumb-current {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 420px;
}

@media (max-width: 760px) {
    .blog-breadcrumb-current { max-width: 220px; }
}

.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.blog-tag {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 206, 201, 0.16);
    border: 1px solid rgba(0, 206, 201, 0.4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blog-teal);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Topic tag - the second, bespoke-per-article label already baked into
   most thumbnail artwork (e.g. "Схема 1.0.3", "Мнение", "Склад") but
   previously shown nowhere else on the live page. Amber to match that
   artwork's own second-badge color. */
.blog-tag--topic {
    background: rgba(246, 169, 59, 0.16);
    border-color: rgba(246, 169, 59, 0.4);
    color: var(--blog-amber);
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}

.blog-meta-item i { font-size: 0.75rem; }


/* ────────────────────────────────────────────────
   BLOG INDEX - ARTICLE GRID
   Capped narrower than the site's default 1600px container - at full
   width that container turned 2-up cards into ~770px slabs with a lot
   of dead space. 3 columns around 380px reads as a deliberate editorial
   grid at any width instead of stretching to fill whatever screen it's on.
   ──────────────────────────────────────────────── */
.blog-index-section {
    background: #f9fafb;
    padding: 4rem 0 5rem;
}

.blog-index-section .container {
    max-width: 1280px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.75rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #b0bac6;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    border-color: #b8c0cc;
    color: inherit;
}

.blog-card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.blog-card-tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 206, 201, 0.1);
    border: 1px solid rgba(0, 206, 201, 0.35);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: #00a19d;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: fit-content;
}

.blog-card-tag--topic {
    background: rgba(246, 169, 59, 0.1);
    border-color: rgba(246, 169, 59, 0.4);
    color: #b45309;
}

.blog-card-title {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0f3d5c;
    line-height: 1.4;
    margin: 0;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #6c7a8a;
}

.blog-card-meta i { font-size: 0.75rem; margin-right: 0.3rem; }

.blog-card-read {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e7fcf;
    margin-top: auto;
}

.blog-card-read i { font-size: 0.75rem; margin-left: 0.25rem; transition: transform 0.15s ease; }
.blog-card:hover .blog-card-read i { transform: translateX(4px); }

.blog-empty {
    color: #6c7a8a;
    font-style: italic;
}


/* ────────────────────────────────────────────────
   ARTICLE BODY - READING AREA
   ──────────────────────────────────────────────── */
.blog-article-body {
    background: #fff;
    padding: 3.5rem 0 5rem;
}

.blog-article-content {
    max-width: 720px;
    margin: 0 auto;
}

/* ────────────────────────────────────────────────
   READING PROGRESS BAR - injected by blog-article.js, tracks scroll
   through .blog-article-content. Same spectrum as the beacon/header
   rule, used here as a functional indicator rather than decoration.
   ──────────────────────────────────────────────── */
.blog-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--blog-teal), var(--blog-blue), var(--blog-purple), var(--blog-amber));
    z-index: 1045;
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
    .blog-progress-bar { transition: width 0.1s linear; }
}

/* ────────────────────────────────────────────────
   TABLE OF CONTENTS - injected by blog-article.js after the h1, only
   when an article has 3+ h2 sections. Numbered because the order is
   real: it's the article's own reading sequence, not decoration.
   ──────────────────────────────────────────────── */
.blog-toc {
    margin: 0 0 2.5rem;
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border: 1px solid #e3e7ec;
    border-left: 3px solid var(--blog-teal);
    border-radius: 0 10px 10px 0;
}

.blog-toc-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c7a8a;
    margin-bottom: 0.85rem;
}

.blog-toc-list {
    list-style: none;
    counter-reset: toc-counter;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.blog-toc-list li { counter-increment: toc-counter; }

.blog-toc-list a {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    font-size: 0.9375rem;
    color: #0f3d5c;
    text-decoration: none;
    line-height: 1.5;
}

.blog-toc-list a::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blog-teal);
    flex-shrink: 0;
}

.blog-toc-list a:hover { color: #1e7fcf; text-decoration: underline; }

/* Typography */
.blog-article-content h1 {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    font-weight: 800;
    color: #0f3d5c;
    line-height: 1.25;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e3e7ec;
}

.blog-article-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f3d5c;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    line-height: 1.35;
}

.blog-article-content h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1a5a8e;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.blog-article-content p {
    font-size: 1rem;
    color: #374151;
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.blog-article-content strong {
    color: #0f3d5c;
    font-weight: 600;
}

/* Lists */
.blog-list {
    margin: 0 0 1.25rem 0;
    padding-left: 0;
    list-style: none;
}

.blog-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-size: 1rem;
    color: #374151;
    line-height: 1.75;
    border-bottom: 1px solid #f0f2f5;
}

.blog-list li:last-child { border-bottom: none; }

.blog-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1e7fcf;
}


/* ────────────────────────────────────────────────
   INLINE CODE
   ──────────────────────────────────────────────── */
code.blog-code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.85em;
    background: #eef2f7;
    color: #0f3d5c;
    padding: 0.15em 0.45em;
    border-radius: 4px;
    border: 1px solid #d1d7df;
    white-space: nowrap;
}


/* ────────────────────────────────────────────────
   PULLQUOTE - the one line in a piece worth lifting out and making
   someone stop scrolling. Amber to match the beacon/header accent,
   oversized quote mark behind the text as the one flourish.
   ──────────────────────────────────────────────── */
.blog-pullquote {
    position: relative;
    margin: 2.5rem 0;
    padding: 0.25rem 0 0.25rem 2rem;
    border-left: 4px solid var(--blog-amber);
}

.blog-pullquote::before {
    content: '\201C';
    position: absolute;
    top: -1.5rem;
    left: 0.35rem;
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(246, 169, 59, 0.18);
    line-height: 1;
    pointer-events: none;
}

.blog-pullquote p {
    position: relative;
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.5;
    color: #0f3d5c;
    margin: 0;
}

.blog-pullquote cite {
    display: block;
    margin-top: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 600;
    color: #6c7a8a;
}

@media (max-width: 640px) {
    .blog-pullquote p { font-size: 1.15rem; }
    .blog-pullquote::before { font-size: 3rem; }
}


/* ────────────────────────────────────────────────
   KEY TAKEAWAYS - per-article summary, written by hand (not generated),
   sitting right after the content as a wrap-up before the author card
   and related articles.
   ──────────────────────────────────────────────── */
.blog-takeaways {
    margin: 3rem 0 0;
    padding: 1.5rem 1.75rem;
    background: rgba(0, 206, 201, 0.06);
    border: 1px solid rgba(0, 206, 201, 0.25);
    border-radius: 12px;
}

.blog-takeaways-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 1.0625rem;
    font-weight: 800;
    color: #0f3d5c;
    margin: 0 0 1.1rem;
}

.blog-takeaways-title i { color: #00a19d; font-size: 0.9375rem; }

.blog-takeaways-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-takeaways-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.6;
}

.blog-takeaways-list li i {
    color: #00a19d;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}


/* ────────────────────────────────────────────────
   AUTHOR CARD + SHARE - who wrote it, and a way to pass it on. The
   photo carries the visual weight here deliberately - a real person
   behind SAF-T opinions/claims matters more for trust than a tidy
   layout, so the portrait is sized to be seen, not a tiny avatar.
   ──────────────────────────────────────────────── */
.blog-endmeta {
    margin: 2.5rem 0 0;
    padding: 1.75rem 2rem;
    background: #f9fafb;
    border: 1px solid #e3e7ec;
    border-radius: 14px;
}

.blog-authorcard {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.blog-authorcard-photo {
    width: 128px;
    height: 160px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 8px 20px -6px rgba(15, 61, 92, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-authorcard:hover .blog-authorcard-photo {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -6px rgba(15, 61, 92, 0.4);
}

.blog-authorcard-name {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 1.1875rem;
    font-weight: 800;
    color: #0f3d5c;
}

.blog-authorcard-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #00a19d;
    margin-top: 0.3rem;
}

.blog-authorcard-bio {
    font-size: 0.9375rem;
    color: #4a5568;
    line-height: 1.65;
    max-width: 480px;
    margin: 0.85rem 0 0;
}

.blog-share {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e3e7ec;
}

.blog-share-label {
    font-size: 0.8125rem;
    color: #6c7a8a;
    margin-right: 0.15rem;
}

.blog-share a,
.blog-share button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d1d7df;
    color: #4a5568;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.blog-share a:hover,
.blog-share button:hover {
    border-color: #1e7fcf;
    color: #1e7fcf;
    background: rgba(30, 127, 207, 0.06);
}

.blog-share button.blog-share-copied {
    border-color: #00a19d;
    color: #00a19d;
    background: rgba(0, 206, 201, 0.08);
}

@media (max-width: 560px) {
    .blog-authorcard { align-items: flex-start; gap: 1rem; }
    .blog-authorcard-photo { width: 84px; height: 105px; border-radius: 10px; }
    .blog-authorcard-name { font-size: 1.0625rem; }
    .blog-authorcard-bio { margin-top: 0.5rem; }
}


/* ────────────────────────────────────────────────
   PREV / NEXT ARTICLE NAV
   ──────────────────────────────────────────────── */
.blog-postnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.75rem 0 0;
}

.blog-postnav-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.blog-postnav-link:hover {
    border-color: #b8c0cc;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
    color: inherit;
}

.blog-postnav-link--next { text-align: right; align-items: flex-end; }

.blog-postnav-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a97a8;
}

.blog-postnav-title {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f3d5c;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .blog-postnav { grid-template-columns: 1fr; }
    .blog-postnav-link--next { text-align: left; align-items: flex-start; }
}


/* ────────────────────────────────────────────────
   RULE LIST (GL.1, SD.P.22 style)
   ──────────────────────────────────────────────── */
.blog-rule-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1.5rem 0;
    border-left: 3px solid #d1d7df;
    padding-left: 1.25rem;
}

.blog-rule-list li {
    padding: 0.45rem 0;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.7;
    border-bottom: 1px solid #f0f2f5;
}

.blog-rule-list li:last-child { border-bottom: none; }


/* ────────────────────────────────────────────────
   EQUATION BLOCK
   ──────────────────────────────────────────────── */
.blog-equation {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 2;
    background: #0f3d5c;
    color: #e8f4f8;
    padding: 1.5rem 1.75rem;
    border-radius: 8px;
    margin: 1.75rem 0;
    white-space: pre;
    overflow-x: auto;
    border-left: 4px solid #00cec9;
}


/* ────────────────────────────────────────────────
   CHECKLIST (feature-row style)
   ──────────────────────────────────────────────── */
.blog-checklist {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
    overflow: hidden;
}

.blog-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e3e7ec;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.65;
    background: #fff;
    transition: background 0.15s ease;
}

.blog-checklist li:last-child { border-bottom: none; }
.blog-checklist li:hover { background: #f9fafb; }

.blog-checklist li i {
    color: #1e7fcf;
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.blog-checklist li span { flex: 1; }


/* ────────────────────────────────────────────────
   ESTIMATE CARD
   ──────────────────────────────────────────────── */
.blog-estimate-card {
    margin: 2rem 0;
    border: 1px solid #d1d7df;
    border-radius: 10px;
    overflow: hidden;
    background: #f9fafb;
}

.blog-estimate-title {
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #0f3d5c, #1a5a8e);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
}

.blog-estimate-rows {
    padding: 0.5rem 0;
}

.blog-estimate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e3e7ec;
    font-size: 0.9375rem;
    color: #374151;
}

.blog-estimate-row:last-child { border-bottom: none; }

.blog-estimate-row--total {
    background: #fff;
    font-weight: 700;
    color: #0f3d5c;
    font-size: 1rem;
}

.blog-estimate-task { flex: 1; }

.blog-estimate-time {
    font-weight: 600;
    color: #1e7fcf;
    white-space: nowrap;
    font-size: 0.9375rem;
}

.blog-estimate-row--total .blog-estimate-time {
    color: #0f3d5c;
    font-size: 1rem;
}

.blog-estimate-note {
    padding: 0.875rem 1.25rem;
    margin: 0;
    font-size: 0.875rem;
    color: #6c7a8a;
    background: #f0f2f5;
    border-top: 1px solid #e3e7ec;
    line-height: 1.6;
    font-style: italic;
}


/* ────────────────────────────────────────────────
   AUTHOR NOTE (closing Magi section)
   ──────────────────────────────────────────────── */
.blog-author-note {
    margin-top: 3rem;
    padding: 1.75rem 2rem;
    background: #f0f8ff;
    border: 1px solid #b8d8f0;
    border-left: 4px solid #1e7fcf;
    border-radius: 0 10px 10px 0;
}

.blog-author-note-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e7fcf;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.blog-author-note p {
    font-size: 1rem;
    color: #0f3d5c;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.blog-author-note-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1e7fcf;
    text-decoration: none;
    transition: gap 0.15s ease;
}

.blog-author-note-link:hover {
    color: #0f3d5c;
    gap: 0.75rem;
}

.blog-author-note-link i { font-size: 0.8125rem; }

.blog-author-note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.blog-author-note-link--cta {
    background: #1e7fcf;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.blog-author-note-link--cta:hover {
    background: #0f3d5c;
    color: #fff;
    gap: 0.75rem;
}


/* ────────────────────────────────────────────────
   RELATED ARTICLES
   Breaks out of the 720px reading column deliberately - at that width
   the grid could only ever fit 2 cards per row, and the section read as
   a dim footnote rather than an invitation to keep browsing. Full-bleed
   light band (same tone as the index grid's own background, so it
   reads as a continuation of that browsing experience) plus a real
   display-font heading instead of a tiny gray label.
   ──────────────────────────────────────────────── */
.blog-related {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 3.5rem;
    padding: 3.5rem 1.5rem 3rem;
    background: #f9fafb;
    border-top: 1px solid #e3e7ec;
}

.blog-related-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.blog-related-title {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 1.375rem;
    font-weight: 800;
    color: #0f3d5c;
    margin: 0 0 0.6rem;
}

.blog-related-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 0.85rem;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--blog-teal), var(--blog-amber));
}

.blog-related-grid {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.blog-related-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.blog-related-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #b8c0cc;
    color: inherit;
}

.blog-related-card-thumb { border-radius: 10px 10px 0 0; }

.blog-related-card:hover .blog-related-card-thumb img {
    transform: scale(1.03);
}

.blog-related-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    padding: 1rem 1.25rem 1.25rem;
}

.blog-related-card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.blog-related-card-tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 206, 201, 0.08);
    border: 1px solid rgba(0, 206, 201, 0.3);
    font-size: 0.7rem;
    font-weight: 700;
    color: #00a8a5;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    width: fit-content;
}

.blog-related-card-tag--topic {
    background: rgba(246, 169, 59, 0.08);
    border-color: rgba(246, 169, 59, 0.35);
    color: #b45309;
}

.blog-related-card-title {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f3d5c;
    line-height: 1.4;
    flex: 1;
}

.blog-related-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.375rem;
}

.blog-related-card-meta {
    font-size: 0.8rem;
    color: #8a97a8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-related-card-read {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e7fcf;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-related-card-read i {
    font-size: 0.6875rem;
    transition: transform 0.15s ease;
}

.blog-related-card:hover .blog-related-card-read i {
    transform: translateX(3px);
}

/* ────────────────────────────────────────────────
   BACK LINK
   ──────────────────────────────────────────────── */
.blog-back-link {
    max-width: 720px;
    margin: 1.75rem auto 0;
    padding-top: 1.75rem;
    border-top: 1px solid #e3e7ec;
}

.blog-related + .blog-back-link {
    border-top: none;
    padding-top: 1.25rem;
    margin-top: 1rem;
}

.blog-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c7a8a;
    text-decoration: none;
    transition: color 0.15s ease, gap 0.15s ease;
}

.blog-back-link a:hover {
    color: #1a5a8e;
    gap: 0.75rem;
}

.blog-back-link i { font-size: 0.8125rem; }


/* ────────────────────────────────────────────────
   NUMBERED STEPS
   ──────────────────────────────────────────────── */
.blog-steps {
    margin: 0 0 1.25rem 0;
    padding-left: 0;
    list-style: none;
    counter-reset: step-counter;
}

.blog-steps li {
    position: relative;
    padding: 0.6rem 0 0.6rem 2.5rem;
    font-size: 1rem;
    color: #374151;
    line-height: 1.75;
    border-bottom: 1px solid #f0f2f5;
    counter-increment: step-counter;
}

.blog-steps li:last-child { border-bottom: none; }

.blog-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #1e7fcf;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.5rem;
    text-align: center;
}


/* ────────────────────────────────────────────────
   WARNING BLOCK
   ──────────────────────────────────────────────── */
.blog-warning {
    margin: 1.75rem 0;
    padding: 1.5rem 1.75rem;
    background: #fffbf0;
    border: 1px solid #f5d97e;
    border-left: 4px solid #f59e0b;
    border-radius: 0 10px 10px 0;
}

.blog-warning-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.blog-warning p {
    font-size: 1rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

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

.blog-warning .blog-equation {
    margin: 0.75rem 0;
    font-size: 0.85rem;
}


/* ────────────────────────────────────────────────
   TIP BLOCK
   ──────────────────────────────────────────────── */
.blog-tip {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: #f0fdf9;
    border: 1px solid #99e6d8;
    border-left: 4px solid #00cec9;
    border-radius: 0 8px 8px 0;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.7;
}

.blog-legal-note {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.6;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.blog-tip-link {
    display: inline-block;
    margin-top: 0.6rem;
    color: #00cec9;
    font-weight: 600;
    text-decoration: none;
}

.blog-tip-link:hover { text-decoration: underline; }

.blog-video-wrap {
    margin: 2.5rem 0;
}

.blog-video-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.blog-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.blog-video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}



/* ────────────────────────────────────────────────
   REPORTS TABLE
   ──────────────────────────────────────────────── */
.blog-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.75rem 0;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.blog-table th {
    background: linear-gradient(135deg, #0f3d5c, #1a5a8e);
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
    text-align: left;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.blog-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e3e7ec;
    color: #374151;
    vertical-align: top;
    line-height: 1.6;
}

.blog-table tr:last-child td { border-bottom: none; }
.blog-table tr:nth-child(even) td { background: #f9fafb; }


/* ────────────────────────────────────────────────
   BLOG INDEX BOTTOM CTA
   ──────────────────────────────────────────────── */
.blog-bottom-cta {
    padding: 4.5rem 0;
    text-align: center;
}

.blog-bottom-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
    margin: 0 auto;
}

.blog-bottom-cta-title {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-size: clamp(1.35rem, 2.7vw, 1.75rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.875rem;
    line-height: 1.25;
}

.blog-bottom-cta-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.75;
    margin-bottom: 2rem;
}

.blog-bottom-cta-actions {
    display: flex;
    gap: 0.875rem;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-bottom-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.blog-bottom-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.blog-bottom-cta-btn--primary {
    background: #1e7fcf;
    color: #fff;
    border: 1px solid transparent;
}

.blog-bottom-cta-btn--primary:hover { color: #fff; }

.blog-bottom-cta-btn--secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.88);
}

.blog-bottom-cta-btn--secondary:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}


/* ────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .blog-estimate-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .blog-article-content h1 { font-size: 1.5rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-related-grid { grid-template-columns: 1fr; }
    .blog-author-note { padding: 1.25rem 1.25rem; }
    .blog-table-wrap {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: -1.25rem;
        margin-right: -1.25rem;
    }

    .blog-table thead { display: none; }

    .blog-table tr {
        display: block;
        border-bottom: 2px solid #e3e7ec;
        padding: 0.75rem 1.25rem;
    }

    .blog-table tr:last-child { border-bottom: none; }
    .blog-table tr:nth-child(even) td { background: transparent; }
    .blog-table tr:nth-child(even) { background: #f9fafb; }

    .blog-table td {
        display: block;
        border-bottom: none;
        padding: 0.25rem 0;
        font-size: 0.8125rem;
    }

    .blog-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #0f3d5c;
        margin-bottom: 0.15rem;
        margin-top: 0.5rem;
    }

    .blog-table td:first-child::before { margin-top: 0; }
}
