/* erpnexai blog and long-form article styles */
.blog-page,
.article-page {
    background: #ffffff;
}

.blog-shell {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
}

.blog-kicker {
    margin: 0 0 0.85rem;
    color: #8a5200;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.blog-hero .blog-kicker,
.blog-cta-band .blog-kicker,
.article-cta .blog-kicker {
    color: #f6c453;
}

footer .footer-heading {
    margin-bottom: 1.25rem;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
}

.blog-hero {
    padding: 5.5rem 0 4.5rem;
    color: #ffffff;
    background: #0f2440;
    border-bottom: 5px solid #f0a500;
}

.blog-hero .blog-shell {
    max-width: 850px;
    margin-left: max(1.5rem, calc((100% - 1180px) / 2));
}

.blog-hero h1 {
    max-width: 760px;
    margin: 0 0 1.2rem;
    color: #ffffff;
    font-size: 3.6rem;
    line-height: 1.08;
    letter-spacing: 0;
}

.blog-hero p:not(.blog-kicker) {
    max-width: 760px;
    margin: 0;
    color: #dce6f0;
    font-size: 1.18rem;
    line-height: 1.75;
}

.featured-post-section {
    padding: 5rem 0;
}

.featured-post {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 3.5rem;
    align-items: center;
}

.featured-post-media {
    display: block;
    overflow: hidden;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    aspect-ratio: 1.8947 / 1;
    background: #eef2f6;
}

.featured-post-media img,
.article-cover img,
.home-blog-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-post-media img {
    transition: transform 0.35s ease;
}

.featured-post-media:hover img {
    transform: scale(1.025);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-bottom: 1rem;
    color: #667483;
    font-size: 0.8rem;
    font-weight: 700;
}

.post-meta span:first-child {
    color: #b36b00;
}

.featured-post-copy h2 {
    margin: 0 0 1rem;
    font-size: 2.1rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.featured-post-copy h2 a {
    color: #1f2937;
    text-decoration: none;
}

.featured-post-copy h2 a:hover {
    color: #1e3a5f;
}

.featured-post-copy > p {
    margin: 0 0 1.25rem;
    color: #586069;
    font-size: 1rem;
    line-height: 1.75;
}

.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.topic-list span {
    padding: 0.38rem 0.65rem;
    border: 1px solid #d4dde7;
    border-radius: 4px;
    color: #1e3a5f;
    background: #f6f8fa;
    font-size: 0.75rem;
    font-weight: 700;
}

.blog-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #1e3a5f;
    font-weight: 800;
    text-decoration: none;
}

.blog-text-link:hover {
    color: #b36b00;
}

.blog-topics {
    padding: 5rem 0;
    background: #f6f8fa;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.blog-section-header {
    margin-bottom: 2.75rem;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.topic-card {
    min-height: 230px;
    padding: 2rem;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    background: #ffffff;
}

.topic-card i {
    margin-bottom: 1.5rem;
    color: #b36b00;
    font-size: 1.5rem;
}

.topic-card h3 {
    margin: 0 0 0.75rem;
    color: #1f2937;
    font-size: 1.2rem;
}

.topic-card p {
    margin: 0;
    color: #586069;
    line-height: 1.7;
}

.blog-cta-band {
    padding: 4.25rem 0;
    color: #ffffff;
    background: #1e3a5f;
}

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

.blog-cta-inner h2 {
    margin: 0 0 0.75rem;
    color: #ffffff;
    font-size: 2rem;
    letter-spacing: 0;
}

.blog-cta-inner p:not(.blog-kicker) {
    max-width: 680px;
    margin: 0;
    color: #dce6f0;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-top: 1.4rem;
    color: #6b7280;
    font-size: 0.82rem;
}

.article-breadcrumb a {
    color: #1e3a5f;
    text-decoration: none;
}

.article-breadcrumb i {
    color: #9aa6b2;
    font-size: 0.65rem;
}

.article-hero {
    padding: 4.4rem 0 3.25rem;
}

.article-hero-copy {
    max-width: 960px;
    text-align: center;
}

.article-hero h1 {
    max-width: 900px;
    margin: 0 auto 1.4rem;
    color: #17212b;
    font-size: 3.35rem;
    line-height: 1.12;
    letter-spacing: 0;
}

.article-dek {
    max-width: 780px;
    margin: 0 auto 1.75rem;
    color: #53616f;
    font-size: 1.18rem;
    line-height: 1.7;
}

.article-byline {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
}

.author-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: #1e3a5f;
    font-size: 1.25rem;
    font-weight: 900;
}

.author-mark i {
    color: #f0a500;
    font-size: 1.15rem;
}

.article-byline strong,
.article-byline span {
    display: block;
}

.article-byline strong {
    color: #1f2937;
    font-size: 0.9rem;
}

.article-byline div > span {
    color: #6b7280;
    font-size: 0.78rem;
}

.article-cover {
    margin-top: 3rem;
    overflow: hidden;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    aspect-ratio: 1.8947 / 1;
    background: #eef2f6;
}

.article-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 760px);
    gap: 4rem;
    justify-content: center;
    padding: 2.5rem 0 6rem;
}

.article-toc {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding-right: 1rem;
}

.article-toc > strong {
    display: block;
    margin-bottom: 0.8rem;
    color: #17212b;
    font-size: 0.82rem;
    text-transform: uppercase;
}

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

.article-toc li {
    margin-bottom: 0.5rem;
    color: #84909c;
    font-size: 0.76rem;
    line-height: 1.35;
}

.article-toc a,
.article-mobile-toc a {
    color: #53616f;
    text-decoration: none;
}

.article-toc a:hover,
.article-mobile-toc a:hover {
    color: #b36b00;
}

.article-mobile-toc {
    display: none;
}

.article-content {
    min-width: 0;
    color: #263640;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.03rem;
    line-height: 1.78;
}

.article-content .article-disclosure {
    display: flex;
    gap: 0.9rem;
    margin: 0 0 2.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid #d9c58f;
    border-left: 4px solid #f0a500;
    border-radius: 6px;
    background: #fff9e8;
    font-family: Inter, sans-serif;
}

.article-disclosure i {
    padding-top: 0.2rem;
    color: #9a5c00;
}

.article-disclosure p {
    margin: 0;
    font-size: 0.87rem;
    line-height: 1.6;
}

.article-content section {
    padding: 0;
    scroll-margin-top: 100px;
}

.article-content h2,
.article-content h3 {
    font-family: Inter, sans-serif;
    letter-spacing: 0;
}

.article-content h2 {
    margin: 3.5rem 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid #d8dee4;
    color: #17212b;
    font-size: 1.75rem;
    line-height: 1.25;
}

.article-content h3 {
    margin: 2rem 0 0.6rem;
    color: #1e3a5f;
    font-size: 1.12rem;
}

.article-content p,
.article-content li {
    overflow-wrap: anywhere;
}

.article-content a {
    color: #1e3a5f;
    text-underline-offset: 3px;
}

.article-content code {
    padding: 0.12em 0.32em;
    border-radius: 3px;
    color: #12324d;
    background: #edf2f6;
    font-family: "Cascadia Mono", "Liberation Mono", Consolas, monospace;
    font-size: 0.86em;
}

.article-content pre {
    max-width: 100%;
    margin: 0.75rem 0 1.3rem;
    overflow-x: auto;
    padding: 1rem 1.1rem;
    border: 1px solid #293a47;
    border-radius: 6px;
    color: #edf5f2;
    background: #17242d;
    font-size: 0.8rem;
    line-height: 1.55;
    white-space: pre;
}

.article-content pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

.article-content .notice {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid #e8d6a5;
    border-radius: 5px;
    background: #fff6dc;
    font-family: Inter, sans-serif;
    font-size: 0.9rem;
}

.article-content .notice strong {
    color: #7b4b08;
}

.article-content .split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.article-content .callout {
    padding: 1rem;
    border-top: 3px solid #1f8a70;
    border-radius: 0 0 6px 6px;
    background: #eaf5f1;
}

.article-content .callout h3 {
    margin-top: 0;
    color: #146b58;
}

.article-content .architecture {
    margin: 1.35rem 0;
    padding: 0.8rem;
    overflow-x: auto;
    border: 1px solid #d8dee4;
    border-radius: 6px;
    background: #fbfcfc;
}

.article-content .architecture svg {
    display: block;
    min-width: 680px;
    width: 100%;
    height: auto;
}

.article-content .tree {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #d8dee4;
    border-radius: 5px;
    color: #263640;
    background: #f6f8fa;
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.article-content .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
}

.article-content table {
    min-width: 680px;
    width: 100%;
    border-collapse: collapse;
    font-family: Inter, sans-serif;
    font-size: 0.78rem;
    line-height: 1.45;
}

.article-content th,
.article-content td {
    padding: 0.65rem;
    border: 1px solid #d8dee4;
    text-align: left;
    vertical-align: top;
}

.article-content th {
    color: #20302e;
    background: #e9efef;
}

.article-content .checklist {
    list-style: none;
    padding: 0;
}

.article-content .checklist li {
    position: relative;
    display: block;
    margin: 0;
    padding: 0.35rem 0 0.35rem 1.8rem;
}

.article-content .checklist li::before {
    content: "";
    position: absolute;
    top: 0.78rem;
    left: 0;
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid #1f8a70;
    border-radius: 2px;
    background: #ffffff;
}

.article-references {
    margin-top: 4rem;
    padding: 1.5rem !important;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    background: #f6f8fa;
}

.article-references h2 {
    margin-top: 0;
}

.article-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem;
    border-left: 5px solid #f0a500;
    border-radius: 6px;
    color: #ffffff;
    background: #1e3a5f;
    font-family: Inter, sans-serif;
}

.article-cta h2 {
    margin: 0 0 0.6rem;
    padding: 0;
    border: 0;
    color: #ffffff;
    font-size: 1.4rem;
}

.article-cta p:not(.blog-kicker) {
    max-width: 470px;
    margin: 0;
    color: #dce6f0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.article-cta .btn {
    flex: 0 0 auto;
}

.article-back {
    margin-top: 2.5rem;
    font-family: Inter, sans-serif;
    font-weight: 800;
}

.home-blog-band {
    padding: 5rem 0;
    border-top: 1px solid #d8dee4;
    background: #ffffff;
}

.home-blog-inner {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
}

.home-blog-feature {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 3rem;
    align-items: center;
    margin-top: 2.5rem;
}

.home-blog-image {
    display: block;
    overflow: hidden;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    aspect-ratio: 1.8947 / 1;
    background: #eef2f6;
}

.home-blog-copy h3 {
    margin: 0 0 1rem;
    color: #1f2937;
    font-size: 1.85rem;
    line-height: 1.25;
}

.home-blog-copy p {
    color: #586069;
    line-height: 1.75;
}

@media (max-width: 980px) {
    .featured-post,
    .article-layout,
    .home-blog-feature {
        grid-template-columns: 1fr;
    }

    .article-toc {
        display: none;
    }

    .article-mobile-toc {
        display: block;
        margin-top: 1rem;
    }

    .article-mobile-toc details {
        padding: 1rem;
        border: 1px solid #d8dee4;
        border-radius: 6px;
        background: #f6f8fa;
    }

    .article-mobile-toc summary {
        cursor: pointer;
        color: #1e3a5f;
        font-weight: 800;
    }

    .article-mobile-toc ol {
        columns: 2;
        margin-top: 1rem;
    }

    .article-mobile-toc li {
        margin-bottom: 0.5rem;
        break-inside: avoid;
        font-size: 0.82rem;
    }

    .article-layout {
        padding-top: 1.5rem;
    }

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

@media (max-width: 768px) {
    .blog-shell,
    .home-blog-inner {
        width: min(100% - 2rem, 1180px);
    }

    .blog-hero {
        padding: 4rem 0 3.25rem;
    }

    .blog-hero .blog-shell {
        margin: 0 auto;
    }

    .blog-hero h1 {
        font-size: 2.45rem;
    }

    .featured-post-section,
    .blog-topics,
    .home-blog-band {
        padding: 3.5rem 0;
    }

    .featured-post {
        gap: 2rem;
    }

    .featured-post-copy h2 {
        font-size: 1.7rem;
    }

    .blog-cta-inner,
    .article-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-breadcrumb {
        overflow: hidden;
        white-space: nowrap;
    }

    .article-breadcrumb span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .article-hero {
        padding: 3.25rem 0 2rem;
    }

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

    .article-dek {
        font-size: 1.02rem;
    }

    .article-cover {
        margin-top: 2rem;
    }

    .article-mobile-toc ol {
        columns: 1;
    }

    .article-layout {
        gap: 0;
        padding-bottom: 4rem;
    }

    .article-content {
        font-size: 0.98rem;
    }

    .article-content h2 {
        margin-top: 3rem;
        font-size: 1.5rem;
    }

    .article-content .split {
        grid-template-columns: 1fr;
    }

    .article-content pre {
        margin-right: -0.25rem;
        margin-left: -0.25rem;
        font-size: 0.74rem;
    }

    .article-content .architecture {
        margin-right: -0.25rem;
        margin-left: -0.25rem;
    }

    .article-cta .btn {
        width: 100%;
    }

    .home-blog-feature {
        gap: 1.75rem;
    }

    .blog-page .phone-float,
    .blog-page .whatsapp-float,
    .article-page .phone-float,
    .article-page .whatsapp-float {
        display: none;
    }
}

@media (max-width: 440px) {
    .blog-hero h1,
    .article-hero h1 {
        font-size: 2rem;
    }

    .article-byline {
        align-items: flex-start;
    }

    .article-byline div > span {
        max-width: 250px;
        line-height: 1.5;
    }
}

@media print {
    .article-page > header,
    .article-page > footer,
    .article-breadcrumb,
    .article-toc,
    .article-mobile-toc,
    .article-cta,
    .article-back,
    .phone-float,
    .whatsapp-float {
        display: none !important;
    }

    .article-layout {
        display: block;
        width: 100%;
        padding: 0;
    }

    .article-content {
        max-width: none;
    }
}
