/* ===== Blog Index ===== */
.blog-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 88px 0 92px;
}

.blog-hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    top: -310px;
    right: -90px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow:
        0 0 0 80px rgba(255, 255, 255, 0.035),
        0 0 0 160px rgba(255, 255, 255, 0.025);
    pointer-events: none;
}

.blog-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(to right, transparent 10%, black 100%);
    mask-image: linear-gradient(to right, transparent 10%, black 100%);
    pointer-events: none;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4rem;
}

.blog-hero-copy {
    max-width: 760px;
}

.blog-hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(10px);
}

.blog-hero h1 {
    max-width: 740px;
    margin: 0 0 1.25rem;
    color: white;
    font-size: clamp(2.7rem, 5vw, 4.5rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.blog-hero h1 span {
    color: #fde68a;
}

.blog-hero p {
    max-width: 680px;
    margin: 0 0 1.8rem;
    color: rgba(255, 255, 255, 0.83);
    font-size: 1.08rem;
    line-height: 1.75;
}

.blog-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
}

.blog-hero-link:hover {
    border-color: white;
    color: white;
}

.blog-hero-link span {
    transition: transform 0.2s ease;
}

.blog-hero-link:hover span {
    transform: translateY(3px);
}

.blog-hero-stat {
    display: flex;
    width: 176px;
    min-width: 176px;
    height: 176px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.blog-hero-stat strong {
    color: white;
    font-size: 3.6rem;
    line-height: 1;
    letter-spacing: -0.06em;
}

.blog-hero-stat span {
    margin-top: 0.55rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.blog-list-section {
    padding: 82px 0 96px;
    scroll-margin-top: 68px;
    background: #f8fafc;
}

.blog-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.25rem;
}

.blog-section-tag {
    margin-bottom: 0.7rem;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.blog-list-heading h2 {
    margin: 0 0 0.65rem;
    color: var(--text-dark);
    font-size: clamp(2rem, 4vw, 2.65rem);
    letter-spacing: -0.035em;
    text-align: left;
}

.blog-list-heading p {
    margin: 0;
    color: var(--text-gray);
}

.blog-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    padding: 0.65rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: white;
    box-shadow: var(--shadow-sm);
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.blog-sort-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary-color);
    font-size: 0.85rem;
}

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

.blog-list-item {
    margin: 0;
}

.blog-card {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    min-height: 230px;
    padding: 2rem 2.1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-list-item.is-latest .blog-card {
    border-color: #c7d2fe;
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.08);
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: #a5b4fc;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.09);
}

.blog-card-date {
    display: flex;
    min-height: 132px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    color: var(--text-dark);
    font-style: normal;
}

.blog-date-month {
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.blog-date-day {
    margin: 0.22rem 0 0.1rem;
    color: #111827;
    font-size: 2.25rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.blog-date-year {
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 600;
}

.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;
}

.blog-card-content {
    min-width: 0;
}

.blog-card-kicker {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.blog-card-tag {
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.blog-latest-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-card h3 {
    max-width: 760px;
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2.5vw, 1.72rem);
    line-height: 1.3;
    letter-spacing: -0.022em;
}

.blog-card h3 a {
    color: var(--text-dark);
}

.blog-card h3 a:hover {
    color: var(--primary-color);
}

.blog-card p {
    max-width: 760px;
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.93rem;
    line-height: 1.7;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-light);
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.blog-card-link:hover {
    color: var(--primary-color);
}

.blog-card-arrow {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary-color);
    font-size: 1rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.blog-card-link:hover .blog-card-arrow {
    transform: translateX(3px);
    background: #e0e7ff;
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card-arrow,
    .blog-hero-link span {
        transition: none;
    }
}

@media (max-width: 900px) {
    .blog-hero .container {
        gap: 2rem;
    }

    .blog-hero-stat {
        width: 142px;
        min-width: 142px;
        height: 142px;
    }

    .blog-hero-stat strong {
        font-size: 3rem;
    }

    .blog-card {
        grid-template-columns: 90px minmax(0, 1fr) auto;
        gap: 1.4rem;
        padding: 1.65rem;
    }

    .blog-card-date {
        min-height: 118px;
    }

    .blog-card-link > span:first-child {
        display: none;
    }
}

@media (max-width: 680px) {
    .blog-hero {
        padding: 62px 0 66px;
    }

    .blog-hero .container {
        display: block;
    }

    .blog-hero h1 br {
        display: none;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .blog-hero-stat {
        width: fit-content;
        min-width: 0;
        height: auto;
        margin-top: 2.5rem;
        padding: 0.7rem 1rem;
        flex-direction: row;
        gap: 0.65rem;
        border-radius: 999px;
    }

    .blog-hero-stat strong {
        font-size: 1.45rem;
        letter-spacing: -0.03em;
    }

    .blog-hero-stat span {
        margin: 0;
    }

    .blog-list-section {
        padding: 60px 0 72px;
    }

    .blog-list-heading {
        display: block;
        margin-bottom: 1.75rem;
    }

    .blog-sort {
        margin-top: 1.25rem;
    }

    .blog-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 1.2rem;
        min-height: 0;
        padding: 1.45rem;
    }

    .blog-card-date {
        grid-column: 1 / -1;
        min-height: 0;
        padding-bottom: 1rem;
        align-items: baseline;
        justify-content: flex-start;
        flex-direction: row;
        gap: 0.38rem;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .blog-date-day {
        margin: 0;
        font-size: 1rem;
        letter-spacing: 0;
    }

    .blog-date-year,
    .blog-date-month {
        font-size: 0.7rem;
    }

    .blog-card-content {
        grid-column: 1;
    }

    .blog-card-link {
        grid-column: 2;
        align-self: end;
    }
}

@media (max-width: 420px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-card {
        padding: 1.25rem;
    }

    .blog-card-arrow {
        width: 38px;
        height: 38px;
    }
}

/* ===== Article Hero ===== */
.article-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 50px;
}

.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: white;
}

.article-tag {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.75rem;
}

.article-hero h1 {
    font-size: 2.6rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.article-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    max-width: 680px;
    margin-bottom: 1.25rem;
}

.article-meta {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ===== Article Body ===== */
.article-body {
    background: var(--bg-light);
    padding: 60px 0 80px;
}

.article-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .article-container {
        grid-template-columns: 1fr;
    }
    .toc {
        display: none;
    }
}

/* ===== TOC ===== */
.toc {
    position: sticky;
    top: 80px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.toc h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.toc ol {
    padding-left: 1.2rem;
    margin: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.4;
}

.toc a:hover {
    color: var(--primary-color);
}

/* ===== Article Content ===== */
.article-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 3rem;
    border: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .article-content {
        padding: 1.5rem;
    }
}

.article-content section {
    animation: none;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}

.article-content section:last-of-type {
    border-bottom: none;
}

.article-content h2 {
    font-size: 1.6rem;
    text-align: left;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

.article-content h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-dark);
}

.article-content p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
    padding-left: 1.5rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-content li {
    margin-bottom: 0.4rem;
}

.article-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'Courier New', Courier, monospace;
    color: #1e40af;
}

/* ===== Callouts ===== */
.callout {
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.callout strong {
    display: block;
    margin-bottom: 0.25rem;
}

.callout-tip {
    background: #f0fdf4;
    border-color: #22c55e;
}

.callout-tip strong { color: #166534; }

.callout-warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

.callout-warning strong { color: #92400e; }

.callout-note {
    background: #eff6ff;
    border-color: #3b82f6;
}

.callout-note strong { color: #1e40af; }

/* ===== Code Block ===== */
.code-block {
    background: #0f172a;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.25rem 0;
    font-size: 0.875rem;
}

.code-label {
    background: #1e293b;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    font-family: monospace;
}

.code-block pre {
    margin: 0;
    padding: 1.25rem;
    color: #e2e8f0;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
}

/* ===== Entity Grid ===== */
.entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.entity-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.entity-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.entity-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.entity-card p {
    font-size: 0.85rem;
    margin: 0;
}

/* ===== Architecture Diagram ===== */
.arch-diagram {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.arch-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.arch-box {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid;
    text-align: center;
}

.arch-box.client    { border-color: #7c3aed; background: #ede9fe; color: #4c1d95; }
.arch-box.gateway   { border-color: #0891b2; background: #e0f2fe; color: #0c4a6e; }
.arch-box.service   { border-color: var(--primary-color); background: #eff6ff; color: #1e40af; }
.arch-box.db        { border-color: #059669; background: #ecfdf5; color: #065f46; }
.arch-box.external  { border-color: #7c3aed; background: #faf5ff; color: #4c1d95; }

.db-type {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.75;
}

.arch-arrow {
    color: var(--text-gray);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ===== Flow Steps ===== */
.flow-steps {
    list-style: none;
    padding: 0;
    counter-reset: flow-counter;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flow-steps > li {
    counter-increment: flow-counter;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 1rem;
    position: relative;
    padding-left: 0;
    margin-bottom: 0;
}

.flow-steps > li::before {
    content: counter(flow-counter);
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.flow-step-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.flow-step-header {
    font-weight: 700;
    color: var(--text-dark);
}

.flow-step-body p {
    margin: 0;
    font-size: 0.95rem;
}

/* ===== Comparison Grid ===== */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .comparison-grid { grid-template-columns: 1fr; }
}

.comparison-card {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: relative;
}

.comparison-card.recommended {
    border-color: var(--primary-color);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.comparison-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.comparison-card > p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    font-size: 0.82rem;
}

.pros strong, .cons strong {
    display: block;
    margin-bottom: 0.25rem;
}

.pros strong { color: #059669; }
.cons strong { color: #dc2626; }

.pros ul, .cons ul {
    padding-left: 1rem;
    margin: 0;
}

.pros li, .cons li { margin-bottom: 0.2rem; color: var(--text-dark); }

/* ===== Defense Layers ===== */
.defense-layers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem 0;
}

.defense-layer {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 1rem;
    align-items: start;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.defense-layer:hover {
    box-shadow: var(--shadow-md);
}

.layer-number {
    width: 44px;
    height: 44px;
    background: #eff6ff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.layer-content h4 {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.layer-content p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-gray);
}

/* ===== Flow Diagram ===== */
.flow-diagram {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.flow-box {
    background: #eff6ff;
    border: 2px solid var(--primary-color);
    color: #1e40af;
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.flow-arrow {
    color: var(--text-gray);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== Security Grid ===== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.security-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.security-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.security-item p {
    font-size: 0.88rem;
    margin: 0;
}

.security-item--wide {
    grid-column: 1 / -1;
}

/* ===== Deep Dives ===== */
.deepdive-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.deepdive-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.deepdive-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.deepdive-item p {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
}

.deepdive-item ul {
    padding-left: 1.2rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-dark);
}

.deepdive-item ul li {
    margin-bottom: 0.3rem;
}

/* ===== Article Footer CTA ===== */
.article-footer-cta {
    margin-top: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    color: white;
}

.article-footer-cta h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.article-footer-cta p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.article-footer-cta .btn-primary {
    background: white;
    color: #4c1d95;
    font-weight: 700;
}

.article-footer-cta .btn-primary:hover {
    background: #ede9fe;
}

/* ===== Highlights Section ===== */
.highlights-section {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border: 2px solid #c7d2fe;
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem !important;
    margin-bottom: 2.5rem !important;
    border-bottom: 2px solid #c7d2fe !important;
}

.highlights-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    background: #dbeafe;
    padding: 3px 12px;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.highlights-section h2 {
    font-size: 1.25rem !important;
    margin-bottom: 1.25rem !important;
    color: #1e3a8a !important;
}

.highlights-list {
    list-style: none !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 0 !important;
}

.highlights-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin: 0 !important;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-dark);
}

.hl-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.highlights-list li strong {
    color: #1e3a8a;
}

.highlights-list li div {
    flex: 1;
}

.highlights-list li code {
    background: #dbeafe;
    color: #1e40af;
}

/* ===== Generated Markdown Articles ===== */
.blog-count {
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.blog-card-meta time,
.blog-card-meta span {
    color: var(--text-light);
    font-size: 0.8rem;
}

.toc h2 {
    margin: 0 0 1rem;
    color: var(--text-light);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-align: left;
    text-transform: uppercase;
}

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

.toc ul ul {
    margin-top: 0.45rem;
    padding-left: 0.8rem;
    border-left: 1px solid var(--border-color);
}

.toc li {
    margin-bottom: 0.55rem;
}

.toc-empty {
    margin: 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.markdown-body > :first-child {
    margin-top: 0;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    scroll-margin-top: 100px;
    color: var(--text-dark);
    text-align: left;
}

.markdown-body h2 {
    margin: 2.6rem 0 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.65rem;
}

.markdown-body h3 {
    margin: 2rem 0 0.75rem;
    font-size: 1.25rem;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin: 1.5rem 0 0.65rem;
    font-size: 1.05rem;
}

.markdown-body strong {
    color: var(--text-dark);
}

.markdown-body pre {
    margin: 1.25rem 0;
    padding: 1.25rem;
    overflow-x: auto;
    border-radius: var(--radius);
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.7;
    tab-size: 4;
}

.markdown-body pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.markdown-body blockquote {
    margin: 1.5rem 0;
    padding: 0.9rem 1.25rem;
    border-left: 4px solid var(--primary-color);
    background: #eff6ff;
}

.markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

.markdown-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.markdown-body th,
.markdown-body td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.markdown-body th {
    background: var(--bg-light);
}

.markdown-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: var(--radius);
}

.markdown-body .article-footer-cta {
    margin-bottom: 0;
}

.markdown-body .article-footer-cta h2 {
    margin: 0 0 0.75rem;
    padding: 0;
    border: 0;
    color: white;
    font-size: 1.4rem;
    text-align: center;
}

.footer-section h2 {
    margin-bottom: 10px;
    color: inherit;
    font-size: 1.25rem;
    text-align: left;
}

@media (max-width: 640px) {
    .article-hero {
        padding: 42px 0 38px;
    }

    .article-hero h1 {
        font-size: 2rem;
    }

    .article-subtitle {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}
