/* ===========================================================
   Article Layout — hero, TOC, body, author, related, CTA
   =========================================================== */

/* Reading progress bar */
.cwg-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cwg-bg-soft);
    z-index: 200;
    pointer-events: none;
}
.cwg-reading-progress__bar {
    height: 100%;
    background: var(--cwg-primary);
    width: 0;
    transition: width 0.05s linear;
}

/* === EDITORIAL HERO === */
.cwg-art-hero {
    background: var(--cwg-bg);
    padding: 32px 0 48px;
    border-bottom: 1px solid var(--cwg-line);
}
.cwg-art-hero__inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--cwg-sp-6);
}
.cwg-art-hero__category {
    display: inline-block;
    color: var(--cwg-primary);
    font-family: var(--cwg-font-sans);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 18px;
    text-decoration: none;
}
.cwg-art-hero__category:hover { color: var(--cwg-primary-d); }

.cwg-art-hero__title {
    font-family: var(--cwg-font-serif);
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--cwg-ink);
    margin: 0 0 20px;
}

.cwg-art-hero__excerpt {
    font-family: var(--cwg-font-serif);
    font-size: 22px;
    line-height: 1.5;
    color: var(--cwg-muted);
    font-style: italic;
    margin: 0 0 28px;
    font-weight: 400;
}

.cwg-art-hero__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--cwg-line);
}

.cwg-art-hero__date-line {
    font-family: var(--cwg-font-sans);
    font-size: 13.5px;
    color: var(--cwg-muted);
}
.cwg-art-hero__date-line span[aria-hidden] { margin: 0 6px; }

.cwg-art-hero__author {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cwg-ink);
    text-decoration: none;
}
.cwg-art-hero__author:hover { color: var(--cwg-primary); }
.cwg-art-hero__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.cwg-art-hero__author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cwg-art-hero__author-name {
    font-family: var(--cwg-font-sans);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--cwg-ink);
}
.cwg-art-hero__author-line {
    font-family: var(--cwg-font-sans);
    font-size: 12.5px;
    color: var(--cwg-muted);
}
.cwg-art-hero__author-line span { display: inline-block; }
.cwg-art-hero__author-line span[aria-hidden] { margin: 0 4px; }

.cwg-art-hero__share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--cwg-line);
    border-radius: var(--cwg-radius-pill);
    font-family: var(--cwg-font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--cwg-ink-2);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.cwg-art-hero__share:hover {
    background: var(--cwg-ink);
    color: var(--cwg-bg);
    border-color: var(--cwg-ink);
}

/* === FEATURED IMAGE === */
.cwg-art-feature {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 var(--cwg-sp-6);
}
.cwg-art-feature__img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--cwg-radius-lg);
    display: block;
}
@media (max-width: 600px) {
    .cwg-art-feature { padding: 0; margin: 24px 0; }
    .cwg-art-feature__img { border-radius: 0; }
}

/* === ARTICLE LAYOUT (TOC + content) === */
.cwg-art-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px var(--cwg-sp-6) 60px;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--cwg-sp-8);
}
@media (min-width: 1024px) {
    .cwg-art-wrap {
        grid-template-columns: 240px 1fr;
        gap: 60px;
    }
}

/* Sticky TOC sidebar */
.cwg-art-toc { display: none; }
@media (min-width: 1024px) {
    .cwg-art-toc.is-active { display: block; }
}
.cwg-art-toc__inner {
    position: sticky;
    top: 100px;
    padding-right: 8px;
}
.cwg-art-toc__label {
    font-family: var(--cwg-font-sans);
    font-size: 11px;
    color: var(--cwg-muted);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cwg-line);
}
.cwg-art-toc__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 60vh;
    overflow-y: auto;
}
.cwg-art-toc__nav a {
    display: block;
    padding: 8px 12px 8px 14px;
    border-left: 2px solid transparent;
    color: var(--cwg-muted);
    font-family: var(--cwg-font-sans);
    font-size: 13.5px;
    line-height: 1.4;
    text-decoration: none;
    transition: color .15s, border-color .15s, background .15s;
    border-radius: 0 6px 6px 0;
}
.cwg-art-toc__nav a:hover {
    color: var(--cwg-ink);
    background: var(--cwg-bg-soft);
}
.cwg-art-toc__nav a.is-current {
    color: var(--cwg-ink);
    border-left-color: var(--cwg-primary);
    font-weight: 600;
    background: var(--cwg-bg-soft);
}

.cwg-art-toc__share {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--cwg-line);
    display: flex;
    gap: 8px;
}
.cwg-art-toc__share a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--cwg-line);
    color: var(--cwg-ink-2);
    transition: background .15s, color .15s, border-color .15s;
}
.cwg-art-toc__share a:hover {
    background: var(--cwg-ink);
    color: var(--cwg-bg);
    border-color: var(--cwg-ink);
}

/* Article body */
.cwg-art-body {
    max-width: 760px;
    width: 100%;
}
.cwg-art-body .cwg-article__content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--cwg-ink-2);
}

/* Tags footer */
.cwg-art-tags {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--cwg-line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.cwg-art-tags__label {
    font-family: var(--cwg-font-sans);
    font-size: 12px;
    color: var(--cwg-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
    margin-right: 4px;
}

/* Article pagination */
.cwg-art-pagination {
    margin-top: 32px;
    padding: 16px 20px;
    background: var(--cwg-bg-soft);
    border-radius: var(--cwg-radius);
    font-family: var(--cwg-font-sans);
    font-size: 14px;
}
.cwg-art-pagination a {
    margin: 0 6px;
    padding: 4px 10px;
    background: var(--cwg-bg-card);
    border: 1px solid var(--cwg-line);
    border-radius: var(--cwg-radius-pill);
    color: var(--cwg-ink);
    text-decoration: none;
}
.cwg-art-pagination a:hover { background: var(--cwg-ink); color: var(--cwg-bg); }

/* === AUTHOR BIO CARD === */
.cwg-art-author {
    background: var(--cwg-bg);
    padding: 40px 0 60px;
    border-top: 1px solid var(--cwg-line);
}
.cwg-art-author__inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 var(--cwg-sp-6);
}
.cwg-art-author__card {
    background: var(--cwg-bg-soft);
    border-radius: var(--cwg-radius-xl);
    padding: 36px 36px;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 600px) {
    .cwg-art-author__card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 28px 24px;
    }
}
.cwg-art-author__avatar img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}
@media (max-width: 600px) {
    .cwg-art-author__avatar { display: flex; justify-content: center; }
}
.cwg-art-author__label {
    font-family: var(--cwg-font-sans);
    font-size: 11px;
    color: var(--cwg-muted);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
    margin-bottom: 6px;
}
.cwg-art-author__name {
    font-family: var(--cwg-font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--cwg-ink);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.cwg-art-author__bio {
    font-size: 15px;
    line-height: 1.65;
    color: var(--cwg-ink-2);
    margin: 0 0 16px;
}
.cwg-art-author__link {
    font-family: var(--cwg-font-sans);
    font-size: 13.5px;
    color: var(--cwg-primary);
    font-weight: 600;
    text-decoration: none;
}
.cwg-art-author__link:hover { color: var(--cwg-primary-d); }

/* === RELATED POSTS === */
.cwg-art-related {
    background: var(--cwg-bg-soft);
    padding: 80px 0;
}
.cwg-art-related .cwg-grid--cards {
    max-width: var(--cwg-container);
    margin: 0 auto;
    padding: 0 var(--cwg-sp-6);
}

/* === CTA BANNER === */
.cwg-art-cta {
    background: var(--cwg-ink);
    color: var(--cwg-bg);
    padding: 80px 0;
    text-align: center;
}
.cwg-art-cta__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--cwg-sp-6);
}
.cwg-art-cta__eyebrow {
    display: inline-block;
    color: var(--cwg-primary);
    font-family: var(--cwg-font-sans);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    margin-bottom: 18px;
}
.cwg-art-cta__title {
    font-family: var(--cwg-font-serif);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--cwg-bg);
    margin: 0 0 14px;
}
.cwg-art-cta__title em {
    font-style: italic;
    color: var(--cwg-primary);
    font-weight: 500;
}
.cwg-art-cta__sub {
    font-family: var(--cwg-font-serif);
    font-size: 17px;
    color: rgba(250,250,247,.7);
    margin: 0 0 28px;
    line-height: 1.55;
    font-style: italic;
}
.cwg-art-cta__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.cwg-art-cta .cwg-btn--ghost {
    border-color: rgba(255,255,255,.3);
    color: var(--cwg-bg);
}
.cwg-art-cta .cwg-btn--ghost:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.5);
    color: var(--cwg-bg);
}
