@import url("../blog-demos/assets/demo.css");

/* Formal blog article additions. The selected homepage styles currently come
   from the reviewed 01 demo stylesheet and can be extracted here later. */
.blog-article-page {
    --article-accent: #315fd4;
    --article-ink: #172033;
    --article-muted: #667085;
    min-height: 100vh;
    background: #f5f7fb;
    color: var(--article-ink);
    font: 16px/1.78 "Segoe UI", "Microsoft YaHei", sans-serif;
}

.article-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 max(1.25rem, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid #e1e6ee;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
}

.article-header__brand {
    color: var(--article-accent);
    font-weight: 800;
    text-decoration: none;
}

.article-header nav {
    display: flex;
    gap: 1.2rem;
}

.article-header nav a {
    color: var(--article-muted);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.article-shell {
    display: grid;
    grid-template-columns: minmax(0, 790px) 220px;
    gap: 2rem;
    width: min(1050px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 6rem;
}

.article-main {
    overflow: hidden;
    border: 1px solid #e1e6ee;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(37, 54, 86, 0.08);
}

.article-hero {
    padding: clamp(2rem, 6vw, 4.5rem);
    border-bottom: 1px solid #e6eaf1;
    background:
        radial-gradient(circle at 90% 0, rgba(49, 95, 212, 0.14), transparent 40%),
        #fff;
}

.article-breadcrumbs {
    color: var(--article-muted);
    font-size: 0.8rem;
}

.article-breadcrumbs a {
    color: var(--article-accent);
    text-decoration: none;
}

.article-kicker {
    display: inline-block;
    margin-top: 2rem;
    color: var(--article-accent);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-hero h1 {
    margin: 0.7rem 0 1rem;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    line-height: 1.03;
    letter-spacing: -0.055em;
}

.article-deck {
    max-width: 680px;
    color: var(--article-muted);
    font-size: 1.08rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.5rem;
}

.article-meta span {
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: #eef3ff;
    color: #365aa8;
    font-size: 0.76rem;
}

.article-version {
    margin-top: 1.2rem;
    padding: 0.85rem 1rem;
    border-left: 3px solid #365aa8;
    background: #f5f8ff;
    border-radius: 6px;
    color: var(--article-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.article-version strong {
    color: #1f3565;
    margin-right: 0.35rem;
}

.article-version code {
    background: #e6ecfa;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-size: 0.88em;
}

.article-body {
    padding: clamp(1.5rem, 6vw, 4.5rem);
}

.article-body h2 {
    margin: 3.4rem 0 1rem;
    padding-top: 0.25rem;
    font-size: 1.8rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body h3 {
    margin: 2.2rem 0 0.7rem;
    font-size: 1.2rem;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body table,
.article-body pre,
.article-body blockquote {
    margin-top: 0;
    margin-bottom: 1.2rem;
}

.article-body a {
    color: var(--article-accent);
}

.article-body code {
    padding: 0.12rem 0.36rem;
    border-radius: 5px;
    background: #edf2fb;
    color: #244da5;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.92em;
}

.article-body pre {
    position: relative;
    padding: 2.7rem 1.2rem 1.2rem;
    overflow-x: auto;
    border-radius: 13px;
    background: #111827;
    color: #e5edff;
    line-height: 1.65;
}

.article-body pre::before {
    content: "COMMAND";
    position: absolute;
    top: 0.7rem;
    left: 1.2rem;
    color: #77839b;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

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

.article-note,
.article-warning,
.article-verdict {
    margin: 1.5rem 0;
    padding: 1.1rem 1.2rem;
    border-radius: 11px;
}

.article-note {
    border-left: 4px solid var(--article-accent);
    background: #eef3ff;
}

.article-warning {
    border-left: 4px solid #dc8b24;
    background: #fff7e8;
}

.article-verdict {
    border: 1px solid #b9d5c5;
    background: #eef9f2;
}

.article-verdict strong {
    color: #187044;
}

.article-table-wrap {
    margin: 1.4rem 0;
    overflow-x: auto;
}

.article-body table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.article-body th,
.article-body td {
    padding: 0.8rem;
    border-bottom: 1px solid #e4e8ef;
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: #f7f9fc;
    color: var(--article-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.article-toc {
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 1rem 0;
}

.article-toc strong {
    display: block;
    margin-bottom: 0.7rem;
    color: #98a2b3;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-toc a {
    display: block;
    padding: 0.38rem 0;
    color: var(--article-muted);
    font-size: 0.84rem;
    text-decoration: none;
}

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

.article-source {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e7ef;
    color: var(--article-muted);
    font-size: 0.86rem;
}

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

    .article-toc {
        display: none;
    }
}

@media (max-width: 620px) {
    .article-header nav a:not(:first-child) {
        display: none;
    }

    .article-shell {
        width: 100%;
        padding-top: 0;
    }

    .article-main {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }
}
