:root {
    --article-ink: #16231d;
    --article-muted: #637169;
    --article-paper: #fff;
    --article-soft: #f3f7f4;
    --article-line: #dce6df;
    --article-accent: #8bc53f;
    --article-dark: #102119;
}

html { scroll-behavior: smooth; }
body { background: var(--article-paper); }

.reading-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 10000;
    height: 4px;
    background: rgba(255,255,255,.2);
}
.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--article-accent);
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

.article-hero {
    position: relative;
    margin-top: -120px;
    padding: 240px 24px 120px;
    color: #fff;
    background:
        radial-gradient(circle at 75% 20%, rgba(139,197,63,.23), transparent 28%),
        linear-gradient(135deg, #0c1913, #183b2a 65%, #234d35);
    overflow: hidden;
}
.article-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -42% 38%;
    height: 420px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    transform: rotate(-12deg);
}
.article-hero__inner {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    margin: 0 auto;
}
.article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
    color: rgba(255,255,255,.66);
    font-size: 14px;
}
.article-breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: .5; }
.article-breadcrumb a { color: #fff; text-decoration: none; }
.article-breadcrumb a:hover, .article-breadcrumb a:focus-visible { color: var(--article-accent); }
.article-category, .section-kicker {
    display: inline-block;
    color: var(--article-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.article-hero h1 {
    max-width: 900px;
    margin: 18px 0 22px;
    color: #fff;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.03;
    letter-spacing: -.045em;
}
.article-summary {
    max-width: 760px;
    margin: 0 0 30px;
    color: rgba(255,255,255,.78);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.65;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 14px 28px; color: rgba(255,255,255,.76); font-size: 15px; }
.article-meta span { display: inline-flex; align-items: center; gap: 9px; }
.article-meta i { color: var(--article-accent); }

.article-featured {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 48px), 1120px);
    margin: -72px auto 90px;
}
.article-featured img {
    display: block;
    width: 100%;
    max-height: 630px;
    object-fit: cover;
    border: 8px solid #fff;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(18,35,27,.18);
}

.article-shell {
    display: grid;
    /* grid-template-columns: 210px minmax(0, 760px); */
    gap: 70px;
    justify-content: center;
    width: min(calc(100% - 48px), 1120px);
    margin: 0 auto 90px;
}
.article-toc { position: relative; }
.article-toc > p { margin: 0 0 18px; color: var(--article-ink); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.article-toc nav { position: sticky; top: 110px; display: grid; gap: 11px; border-left: 1px solid var(--article-line); padding-left: 18px; }
.article-toc a { color: var(--article-muted); font-size: 13px; line-height: 1.4; text-decoration: none; transition: color .2s, transform .2s; }
.article-toc a:hover, .article-toc a:focus-visible { color: var(--article-accent); transform: translateX(3px); }
.article-toc .toc-subitem { padding-left: 12px; font-size: 12px; }

.article-content {
    min-width: 0;
    color: var(--article-ink);
    font-size: clamp(17px, 1.6vw, 19px);
    line-height: 1.85;
}
.article-content > :first-child { margin-top: 0 !important; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 {
    scroll-margin-top: 110px;
    color: var(--article-ink);
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.2;
}
.article-content h1 { margin: 1.8em 0 .65em; font-size: clamp(34px, 5vw, 52px); }
.article-content h2 { margin: 2.2em 0 .65em; font-size: clamp(30px, 4vw, 42px); }
.article-content h3 { margin: 1.8em 0 .6em; font-size: clamp(24px, 3vw, 31px); }
.article-content h4 { margin: 1.6em 0 .55em; font-size: 21px; }
.article-content p { margin: 0 0 1.45em; color: #35433c; font-size: inherit; line-height: inherit; }
.article-content strong { color: var(--article-ink); font-weight: 750; }
.article-content a { color: #397b47; text-decoration: underline; text-decoration-color: rgba(57,123,71,.35); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
.article-content a:hover, .article-content a:focus-visible { color: #1e5c31; text-decoration-color: var(--article-accent); }
.article-content :focus-visible, .share-button:focus-visible, .article-navigation a:focus-visible { outline: 3px solid rgba(139,197,63,.55); outline-offset: 4px; }
.article-content ul, .article-content ol { margin: 0 0 1.7em; padding-left: 1.6em; }
.article-content li { margin: .55em 0; padding-left: .35em; color: #35433c; }
.article-content li::marker { color: var(--article-accent); font-weight: 800; }
.article-content img {
    display: block;
    width: auto;
    max-width: 100% !important;
    height: auto !important;
    margin: 2.4em auto;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(18,35,27,.12);
}
.article-content figure { margin: 2.4em 0; }
.article-content figure img { margin-bottom: .8em; }
.article-content figcaption { color: var(--article-muted); font-size: 14px; line-height: 1.5; text-align: center; }
.article-content blockquote {
    position: relative;
    margin: 2.3em 0;
    padding: 32px 34px 32px 74px;
    border: 0;
    border-left: 4px solid var(--article-accent);
    border-radius: 0 16px 16px 0;
    background: var(--article-soft);
    color: var(--article-ink);
    font-size: clamp(20px, 2.4vw, 27px);
    font-weight: 650;
    line-height: 1.55;
}
.article-content blockquote::before { content: "“"; position: absolute; left: 24px; top: 8px; color: var(--article-accent); font: 700 64px/1 Georgia, serif; }
.article-content blockquote p { color: inherit; font-size: inherit; line-height: inherit; }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content code { border-radius: 5px; background: #edf2ee; padding: .15em .4em; color: #b13d56; font-size: .88em; }
.article-content pre { max-width: 100%; margin: 2em 0; overflow-x: auto; border-radius: 14px; background: #101c16; padding: 25px; color: #e9f3ec; font-size: 14px; line-height: 1.7; }
.article-content pre code { background: transparent; padding: 0; color: inherit; }
.article-content iframe, .article-content video { display: block; width: 100%; max-width: 100%; margin: 2.4em 0; border: 0; border-radius: 18px; aspect-ratio: 16/9; }
.table-scroll { width: 100%; margin: 2em 0; overflow-x: auto; border: 1px solid var(--article-line); border-radius: 14px; box-shadow: 0 10px 35px rgba(18,35,27,.06); }
.article-content table { width: 100%; min-width: 620px; margin: 0; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.article-content th { background: var(--article-dark); color: #fff; font-weight: 700; text-align: left; }
.article-content th, .article-content td { border: 1px solid var(--article-line); padding: 14px 16px; vertical-align: top; }
.article-content td p { margin: 0; color: inherit; font-size: inherit; }
.article-content tr:nth-child(even) { background: var(--article-soft); }

.article-after { width: min(calc(100% - 48px), 970px); margin: 0 auto 100px; }
.share-section { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--article-line); border-bottom: 1px solid var(--article-line); padding: 32px 0; }
.share-section h2 { margin: 5px 0 0; color: var(--article-ink); font-size: 25px; }
.share-actions { display: flex; gap: 10px; }
.share-button { position: relative; display: inline-grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--article-line); border-radius: 50%; background: #fff; color: var(--article-ink); transition: .2s; }
.share-button:hover { border-color: var(--article-accent); background: var(--article-accent); color: #102119; transform: translateY(-2px); }
.copy-status { position: absolute; bottom: -25px; font-size: 11px; color: var(--article-muted); }
.author-card { display: flex; align-items: center; gap: 24px; margin: 55px 0; border-radius: 22px; background: var(--article-soft); padding: 34px; }
.author-mark { display: grid; flex: 0 0 82px; height: 82px; place-items: center; border-radius: 50%; background: var(--article-dark); color: var(--article-accent); font-size: 32px; font-weight: 800; }
.author-card h2 { margin: 4px 0 7px; color: var(--article-ink); font-size: 25px; }
.author-card p { margin: 0; color: var(--article-muted); }
.article-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.article-navigation a { display: grid; gap: 7px; border: 1px solid var(--article-line); border-radius: 16px; padding: 24px; color: var(--article-ink); text-decoration: none; transition: .2s; }
.article-navigation a:hover { border-color: var(--article-accent); transform: translateY(-3px); box-shadow: 0 14px 35px rgba(18,35,27,.08); }
.article-navigation span { color: var(--article-muted); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.article-navigation__next { text-align: right; }

.related-posts { padding: 90px max(24px, calc((100% - 1120px)/2)); background: var(--article-soft); }
.related-posts__header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.related-posts__header h2 { margin: 6px 0 0; color: var(--article-ink); font-size: clamp(32px, 4vw, 48px); }
.related-posts__header > a { color: var(--article-ink); font-weight: 700; text-underline-offset: 5px; }
.related-posts__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.related-card { overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px rgba(18,35,27,.07); }
.related-card__image { display: block; aspect-ratio: 16/10; overflow: hidden; }
.related-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.related-card:hover img { transform: scale(1.04); }
.related-card > div { padding: 22px; }
.related-card span { color: #4c8b49; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.related-card h3 { margin: 9px 0 0; font-size: 20px; line-height: 1.35; }
.related-card h3 a { color: var(--article-ink); text-decoration: none; }

.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 80px max(24px, calc((100% - 1120px)/2)); background: var(--article-dark); color: #fff; }
.article-cta h2 { margin: 8px 0; color: #fff; font-size: clamp(34px, 4.5vw, 56px); letter-spacing: -.035em; }
.article-cta p { margin: 0; color: rgba(255,255,255,.68); font-size: 18px; }
.article-cta .btn-default { flex: 0 0 auto; }

@media (max-width: 991px) {
    .article-hero { padding-top: 210px; }
    .article-shell { grid-template-columns: minmax(0, 760px); }
    .article-toc { display: none; }
    .related-posts__grid { grid-template-columns: repeat(2, 1fr); }
    .related-card:last-child { display: none; }
}

@media (max-width: 767px) {
    .article-hero { margin-top: -95px; padding: 175px 20px 92px; }
    .article-breadcrumb { margin-bottom: 28px; }
    .article-hero h1 { font-size: clamp(38px, 11vw, 56px); }
    .article-featured { width: calc(100% - 30px); margin: -48px auto 58px; }
    .article-featured img { border-width: 5px; border-radius: 18px; }
    .article-shell { width: calc(100% - 40px); margin-bottom: 60px; }
    .article-content { font-size: 17px; line-height: 1.75; }
    .article-content blockquote { padding: 68px 22px 25px; }
    .article-content blockquote::before { left: 20px; top: 14px; }
    .article-after { width: calc(100% - 40px); margin-bottom: 65px; }
    .share-section, .article-cta { align-items: flex-start; flex-direction: column; }
    .author-card { align-items: flex-start; padding: 25px; }
    .author-mark { flex-basis: 62px; height: 62px; font-size: 24px; }
    .article-navigation { grid-template-columns: 1fr; }
    .article-navigation__next { text-align: left; }
    .related-posts { padding-top: 65px; padding-bottom: 65px; }
    .related-posts__header { align-items: flex-start; flex-direction: column; }
    .related-posts__grid { grid-template-columns: 1fr; }
    .related-card:last-child { display: block; }
    .article-cta { padding-top: 65px; padding-bottom: 65px; }
}

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