.post-shell {
    background: linear-gradient(180deg, #f6f9fc 0%, #ffffff 330px);
}

.post-header {
    padding: 2.5rem 0 1.5rem;
}

.post-title {
    max-width: 980px;
    margin: 1rem auto;
    color: var(--primary-navy);
    font-size: var(--ui-title-size);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0;
    word-break: keep-all;
}

.badge-category {
    display: inline-flex;
    color: #005f8f;
    background-color: rgba(0, 119, 182, 0.1);
    padding: 0.38rem 0.75rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.82rem;
}

.post-meta {
    color: #6c7d8f;
    font-size: 0.95rem;
}

.post-summary {
    max-width: var(--ui-reading-width);
    margin: 1.25rem auto 0;
    color: #496172;
    font-size: var(--ui-copy-size);
    line-height: 1.8;
}

.post-img-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 920px;
    max-height: 360px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: #f6f9fc;
    box-shadow: 0 1rem 2.75rem rgba(13, 27, 42, 0.1);
}

.post-img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.article-content {
    max-width: var(--ui-reading-width);
    color: #273849;
    font-size: 1.04rem;
    line-height: 1.9;
}

.article-content h2 {
    color: var(--primary-navy);
    font-weight: 850;
    margin-top: 3.25rem;
    margin-bottom: 1rem;
    font-size: 1.65rem;
    line-height: 1.35;
}

.article-content h3 {
    color: #24384c;
    font-weight: 800;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    font-size: 1.32rem;
}

.article-content p {
    margin-bottom: 1.35rem;
}

.article-content img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 460px;
    margin: 2rem auto;
    border-radius: 8px;
    object-fit: contain;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary-blue);
    color: #40566a;
    background: #f6f9fc;
}

.article-content pre {
    padding: 1.15rem;
    border-radius: 8px;
    background: #0d1b2a;
    color: #f8f9fa;
    overflow-x: auto;
}

.article-content table {
    display: block;
    width: 100%;
    margin: 2rem 0;
    overflow-x: auto;
    border-collapse: collapse;
    white-space: nowrap;
}

.article-content th,
.article-content td {
    padding: 0.85rem 1rem;
    border: 1px solid #dfe5ec;
    vertical-align: top;
}

.article-content th {
    background: #f6f9fc;
    color: var(--primary-navy);
    font-weight: 800;
}

.article-content tr:nth-child(even) td {
    background: #fbfcfe;
}

.toc-sticky {
    position: sticky;
    top: 96px;
    padding: 1.1rem;
    border: 1px solid rgba(13, 27, 42, 0.08);
    border-radius: 8px;
    background: #fff;
}

.toc-link {
    display: block;
    padding: 0.42rem 0 0.42rem 0.85rem;
    color: #6f8191;
    font-size: 0.9rem;
    text-decoration: none;
    border-left: 2px solid #e8eef3;
    transition: all 0.2s ease;
}

.toc-link:hover,
.toc-link.active {
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
    font-weight: 700;
}

.related-section {
    background: #f6f9fc;
    border-top: 1px solid rgba(13, 27, 42, 0.06);
}

.related-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(13, 27, 42, 0.08);
    border-radius: 8px;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2.25rem rgba(13, 27, 42, 0.1);
}

.related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.related-title {
    display: block;
    color: var(--primary-navy);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.45;
}

@media (max-width: 991.98px) {
    .post-header {
        padding-top: 2rem;
    }

    .post-img-frame,
    .post-img {
        max-height: 280px;
    }

    .article-content img {
        max-height: 320px;
    }
}
