:root {
    --article-ink: #17212b;
    --article-muted: #64717d;
    --article-line: #dfe6eb;
    --article-surface: #fff;
    --article-soft: #f1f6f8;
    --article-blue: #1a7aaa;
    --article-blue-dark: #0d4f70;
    --article-orange: #f2a31e;
}

html { scroll-behavior: smooth; }

.blog-detail-page {
    color: var(--article-ink);
    background: #f7f9fa;
}

.article-reading-progress {
    position: fixed;
    inset: 0 0 auto;
    height: 4px;
    z-index: 1100;
    pointer-events: none;
}

.article-reading-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--article-orange), #ffd270);
    box-shadow: 0 0 12px rgba(242, 163, 30, .45);
}

.article-hero {
    min-height: 500px;
    height: auto;
    padding: 90px 0 82px;
    isolation: isolate;
    overflow: hidden;
}

.article-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 15%, rgba(242, 163, 30, .22), transparent 32%),
        radial-gradient(circle at 88% 82%, rgba(26, 122, 170, .35), transparent 38%),
        linear-gradient(115deg, rgba(8, 29, 42, .94), rgba(9, 54, 78, .89));
}

.article-hero::after {
    content: "";
    position: absolute;
    width: 440px;
    height: 440px;
    right: -170px;
    top: -220px;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .02);
}

.article-hero-content {
    max-width: 960px;
    margin: 0 auto;
}

.article-category-pill {
    display: inline-flex;
    margin-bottom: 22px;
    padding: 7px 15px;
    color: #17212b;
    background: var(--article-orange);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
}

.article-category-pill:hover { color: #17212b; background: #ffc35e; }

.article-hero h1 {
    max-width: 930px;
    margin: 0 auto 22px;
    color: #fff;
    font-size: clamp(2.15rem, 4.4vw, 4.35rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.article-hero-summary {
    max-width: 750px;
    margin: 0 auto 24px;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.75;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 11px 24px;
    color: rgba(255, 255, 255, .74);
    font-size: .9rem;
}

.article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.article-meta i { color: var(--article-orange); }

.article-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 26px;
    padding: 10px 16px;
    color: #fff;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    transition: .2s ease;
}

.article-copy-button:hover,
.article-copy-button:focus-visible { background: rgba(255, 255, 255, .17); }
.article-copy-button.is-copied { color: #13202a; background: #fff; }

.article-breadcrumb {
    background: #fff;
    border-bottom: 1px solid var(--article-line);
}

.article-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 16px 0;
    list-style: none;
    color: #82909b;
    font-size: .83rem;
}

.article-breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 9px;
    color: #b6c0c7;
}

.article-breadcrumb a {
    color: var(--article-blue-dark);
    font-weight: 600;
    text-decoration: none;
}

.article-section { padding: 72px 0 88px; }

.article-featured-figure {
    position: relative;
    margin: 0 0 28px;
    overflow: hidden;
    background: #e8eef1;
    border-radius: 24px;
    box-shadow: 0 22px 45px rgba(19, 47, 62, .12);
}

.article-featured-figure img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-paper {
    padding: clamp(28px, 5vw, 62px);
    background: #fff;
    border: 1px solid #e7ecef;
    border-radius: 24px;
    box-shadow: 0 16px 42px rgba(20, 48, 64, .07);
}

.article-content {
    color: #33414c;
    font-size: 1.06rem;
    line-height: 1.9;
}

.article-content > :first-child { margin-top: 0 !important; }

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--article-ink);
    font-weight: 700;
    letter-spacing: -.02em;
    text-wrap: balance;
    scroll-margin-top: 120px;
}

.article-content h2 {
    margin: 2.25em 0 .7em;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.25;
}

.article-content h2::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    margin-bottom: 16px;
    background: var(--article-orange);
    border-radius: 999px;
}

.article-content h3 {
    margin: 1.8em 0 .65em;
    font-size: clamp(1.3rem, 2vw, 1.62rem);
    line-height: 1.35;
}

.article-content p,
.article-content ul,
.article-content ol { margin-bottom: 1.35em; }
.article-content ul,
.article-content ol { padding-left: 1.35rem; }
.article-content li { margin-bottom: .65em; padding-left: .25rem; }
.article-content li::marker { color: var(--article-blue); font-weight: 700; }

.article-content a {
    color: var(--article-blue-dark);
    font-weight: 600;
    text-decoration-color: rgba(26, 122, 170, .35);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 24px 28px 24px 32px;
    color: #274556;
    background: #eef7fa;
    border-left: 5px solid var(--article-blue);
    border-radius: 0 16px 16px 0;
    font-size: 1.08rem;
    font-weight: 500;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.25rem auto;
    border-radius: 16px;
}

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

.article-content th,
.article-content td { padding: 13px 16px; border: 1px solid var(--article-line); }
.article-content th { color: #fff; background: var(--article-blue-dark); }
.article-content iframe { border-radius: 16px; }

.article-sidebar { position: sticky; top: 108px; }

.article-toc-card,
.article-help-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--article-line);
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(21, 51, 67, .07);
}

.article-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px;
    color: var(--article-ink);
    background: transparent;
    border: 0;
    text-align: left;
}

.article-toc-heading { display: flex; align-items: center; gap: 12px; }
.article-toc-heading small,
.article-toc-heading strong { display: block; }

.article-toc-heading small {
    margin-bottom: 2px;
    color: var(--article-muted);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.article-toc-heading strong { font-size: .98rem; }

.article-toc-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: var(--article-blue);
    border-radius: 11px;
}

.article-toc-chevron { color: var(--article-muted); transition: transform .2s ease; }
.article-toc-toggle[aria-expanded="false"] .article-toc-chevron { transform: rotate(-90deg); }

#toc-nav {
    max-height: calc(100vh - 270px);
    overflow-y: auto;
    border-top: 1px solid var(--article-line);
}

#toc-nav[hidden] { display: none; }

.article-toc-list {
    margin: 0;
    padding: 12px 10px 15px;
    list-style: none;
    counter-reset: toc-section;
}

.article-toc-item { margin: 2px 0; }

.article-toc-item a {
    position: relative;
    display: flex;
    padding: 9px 10px 9px 34px;
    color: #596874;
    border-radius: 10px;
    font-size: .84rem;
    line-height: 1.45;
    text-decoration: none;
    transition: .18s ease;
}

.article-toc-item:not(.is-subsection) { counter-increment: toc-section; }

.article-toc-item:not(.is-subsection) a::before {
    content: counter(toc-section, decimal-leading-zero);
    position: absolute;
    left: 10px;
    color: #94a1aa;
    font-size: .67rem;
    font-weight: 700;
}

.article-toc-item.is-subsection a { padding-left: 44px; font-size: .78rem; }

.article-toc-item.is-subsection a::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 16px;
    width: 6px;
    height: 6px;
    background: #bbc5cb;
    border-radius: 50%;
}

.article-toc-item a:hover,
.article-toc-item a.is-active { color: var(--article-blue-dark); background: #edf6f9; }
.article-toc-item a.is-active { font-weight: 700; }
.article-toc-item a.is-active::before { color: var(--article-orange); }

.article-help-card {
    position: relative;
    margin-top: 20px;
    padding: 25px;
    color: #fff;
    background: linear-gradient(145deg, var(--article-blue-dark), #167ca7);
    border: 0;
}

.article-help-card .article-eyebrow { color: #ffd580; }

.article-help-card h2 {
    margin: 8px 0 10px;
    font-size: 1.45rem;
    font-weight: 700;
}

.article-help-card p {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, .76);
    font-size: .86rem;
    line-height: 1.65;
}

.article-help-button {
    display: inline-flex;
    padding: 10px 15px;
    color: #1a2730;
    background: var(--article-orange);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.article-help-button:hover { color: #1a2730; background: #ffc45f; }

.article-eyebrow {
    display: block;
    color: var(--article-blue);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.article-service-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    margin-top: 52px;
    padding: 27px;
    background: var(--article-soft);
    border: 1px solid #dce9ee;
    border-radius: 18px;
}

.article-service-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #fff;
    background: var(--article-blue);
    border-radius: 13px;
}

.article-service-box h2,
.article-share-row h2 {
    margin: 5px 0 8px;
    color: var(--article-ink);
    font-size: 1.35rem;
    font-weight: 700;
}

.article-service-box p { margin-bottom: 15px; color: var(--article-muted); font-size: .9rem; }
.article-service-links { display: flex; flex-wrap: wrap; gap: 8px; }

.article-service-links a {
    padding: 7px 11px;
    color: var(--article-blue-dark);
    background: #fff;
    border: 1px solid #d8e4e9;
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 600;
    text-decoration: none;
}

.article-service-links a:hover { color: #fff; background: var(--article-blue); }

.article-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--article-line);
}

.article-share-row h2 { margin-bottom: 0; }
.article-share-links { display: flex; gap: 9px; }

.article-share-links a {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--article-blue-dark);
    background: #eef5f7;
    border-radius: 50%;
    text-decoration: none;
    transition: .2s ease;
}

.article-share-links a:hover {
    color: #fff;
    background: var(--article-blue);
    transform: translateY(-2px);
}

.related-articles-section {
    padding: 82px 0 90px;
    background: #edf3f5;
    border-top: 1px solid #dce5e9;
}

.related-articles-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.related-articles-heading h2,
.article-section-heading h2 {
    margin: 6px 0 0;
    color: var(--article-ink);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    font-weight: 700;
    letter-spacing: -.025em;
}

.related-articles-heading > a,
.related-article-link {
    color: var(--article-blue-dark);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.related-article-card {
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe7ea;
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(18, 50, 67, .07);
    transition: .25s ease;
}

.related-article-card:hover { transform: translateY(-5px); }
.related-article-image { display: block; overflow: hidden; }

.related-article-image img {
    display: block;
    width: 100%;
    height: 215px;
    object-fit: cover;
    transition: transform .4s ease;
}

.related-article-card:hover .related-article-image img { transform: scale(1.04); }
.related-article-body { padding: 23px; }

.related-article-body > span {
    color: var(--article-blue);
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.related-article-body h3 {
    margin: 10px 0 11px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.45;
}

.related-article-body h3 a { color: var(--article-ink); text-decoration: none; }

.related-article-body p {
    min-height: 61px;
    margin-bottom: 17px;
    color: var(--article-muted);
    font-size: .84rem;
    line-height: 1.65;
}

.article-narrow-container { max-width: 860px; }

.article-comments-section,
.article-reply-section { padding: 78px 0; background: #fff; }
.article-comment-list { display: grid; gap: 14px; margin-top: 28px; }

.article-comment {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 22px;
    background: var(--article-soft);
    border: 1px solid #dfe8eb;
    border-radius: 16px;
}

.article-comment-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    background: var(--article-blue);
    border-radius: 50%;
    font-weight: 700;
}

.article-comment h3 { margin: 1px 0 5px; font-size: .98rem; font-weight: 700; }
.article-comment p { margin: 0; color: var(--article-muted); font-size: .9rem; line-height: 1.7; }
.article-reply-section { background: #eef3f5; }

.article-reply-card {
    padding: clamp(28px, 5vw, 50px);
    background: #fff;
    border: 1px solid #dce5e9;
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(20, 49, 65, .08);
}

.article-section-heading p { margin: 8px 0 0; color: var(--article-muted); }
.article-reply-card form { margin-top: 30px; }
.article-reply-card .form-label { color: var(--article-ink); font-size: .82rem; font-weight: 700; }

.article-reply-card .form-control {
    padding: 13px 15px;
    background: #f8fafb;
    border: 1px solid #d8e1e5;
    border-radius: 11px;
    box-shadow: none;
}

.article-reply-card .form-control:focus {
    background: #fff;
    border-color: var(--article-blue);
    box-shadow: 0 0 0 3px rgba(26, 122, 170, .11);
}

.article-submit-button {
    margin-top: 24px;
    padding: 12px 22px;
    color: #18232b;
    background: var(--article-orange);
    border: 0;
    border-radius: 999px;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .article-hero { min-height: 450px; padding: 72px 0 66px; }
    .article-section { padding: 46px 0 66px; }
    .article-sidebar { position: static; }
    #toc-nav { max-height: none; }
    .article-help-card { display: none; }
}

@media (max-width: 767.98px) {
    .article-hero { min-height: 420px; padding: 62px 0 56px; }
    .article-hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
    .article-hero-summary { display: none; }
    .article-meta { gap: 8px 16px; font-size: .79rem; }
    .article-breadcrumb li:last-child { display: none; }
    .article-paper { padding: 27px 21px; border-radius: 18px; }
    .article-content { font-size: 1rem; line-height: 1.82; }
    .article-service-box { grid-template-columns: 1fr; padding: 22px; }
    .article-share-row,
    .related-articles-heading { align-items: flex-start; flex-direction: column; }
    .related-articles-section,
    .article-comments-section,
    .article-reply-section { padding: 62px 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
