.blog-body {
    background: #f6f7fb;
    color: #121417;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

.blog-page {
    max-width: 1280px;
}

.nav-links a.is-active {
    color: #1f6f5f;
    font-weight: 600;
}

.blog-main {
    padding: 24px 0 80px;
}

.article-hero {
    padding: 24px 12px 36px;
    border-bottom: 1px solid #e3e6eb;
}

.article-meta {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.24em;
    color: #6a7078;
    margin-bottom: 14px;
}

.article-title {
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: -1.4px;
    margin-bottom: 16px;
    font-weight: 500;
    color: #101418;
}

.article-lead {
    font-size: 17px;
    line-height: 1.6;
    color: #4b525a;
    max-width: 860px;
}

.article-hero-row {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e4f5f1;
    color: #0f6a59;
    display: grid;
    place-items: center;
    font-weight: 600;
}

.author-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    color: #5b6169;
}

.author-name {
    font-weight: 600;
    color: #15181c;
}

.author-role {
    font-size: 13px;
    color: #7a828a;
}

.author-date {
    font-size: 12px;
    color: #7a828a;
}

.hero-share {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e6ec;
    padding: 8px 16px;
    border-radius: 999px;
    color: #1f2b2d;
    font-size: 13px;
}

.hero-share-label {
    color: #6a7078;
}

.hero-share-btn {
    text-decoration: none;
    color: #0f6a59;
    font-weight: 600;
}

.article-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 48px;
    padding: 40px 12px 0;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(2px);
    transition:
        opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform, filter;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.article-heading,
.article-subheading {
    scroll-margin-top: 24px;
}

.article-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e6ec;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 26, 32, 0.05);
}

.sidebar-title {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    color: #6a7078;
    margin-bottom: 12px;
}

.sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.sidebar-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.sidebar-list span {
    color: #9aa2ab;
    font-weight: 600;
}

.sidebar-list a {
    text-decoration: none;
    color: #252a2f;
    line-height: 1.4;
}

.sidebar-list a:hover {
    color: #0f6a59;
}

.sidebar-list a:focus-visible {
    outline: 2px solid rgba(15, 106, 89, 0.35);
    outline-offset: 3px;
    border-radius: 6px;
}

.sidebar-meta {
    font-weight: 600;
    color: #1a1f24;
}

.sidebar-link {
    display: block;
    text-decoration: none;
    color: #0f6a59;
    font-weight: 600;
    margin-bottom: 6px;
}

.article-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.article-paragraph {
    font-size: 16px;
    line-height: 1.75;
    color: #2f353c;
}

.article-heading {
    font-size: 28px;
    font-weight: 600;
    color: #101418;
    margin-top: 18px;
}

.article-subheading {
    font-size: 20px;
    font-weight: 600;
    color: #1a1f24;
    margin-top: 10px;
}

.callout {
    background: #f0f7f6;
    border: 1px solid #cce8e2;
    padding: 18px 20px;
    border-radius: 16px;
    color: #214b45;
    font-size: 15px;
    line-height: 1.6;
}

.loop-card {
    background: #ffffff;
    border: 1px solid #e2e6ec;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 16px 40px rgba(15, 26, 32, 0.06);
}

.loop-kicker {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: #6a7078;
}

.loop-line {
    font-weight: 600;
    color: #1a1f24;
}

.loop-subline {
    color: #616871;
}

.loop-phase {
    background: #f7f9fb;
    border: 1px solid #e3e8ee;
    border-radius: 14px;
    padding: 14px;
}

.loop-phase-title {
    font-weight: 600;
    color: #1b232a;
    margin-bottom: 6px;
}

.loop-phase-body {
    color: #616871;
    font-size: 14px;
    line-height: 1.5;
}

.loop-diagram {
    margin-top: 12px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #d7dde4;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #5b6169;
}

.loop-gate {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
    color: #1b232a;
}

.loop-branch {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #6a7078;
}

.chart-card {
    background: #ffffff;
    border: 1px solid #e2e6ec;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 18px 40px rgba(15, 26, 32, 0.06);
}

.chart-title {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    color: #6a7078;
    margin-bottom: 16px;
}

.chart-subtitle {
    font-size: 12px;
    color: #7a828a;
    margin: -8px 0 12px;
}

.chart-grid {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 16px;
    align-items: stretch;
}

.chart-y {
    display: grid;
    gap: 6px;
    font-size: 11px;
    color: #9aa2ab;
}

.chart-plot {
    position: relative;
    min-height: 200px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 95, 80, 0.08), rgba(255, 255, 255, 0));
    border: 1px solid #e2e6ec;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-threshold {
    font-size: 11px;
    color: #b3902a;
    font-weight: 600;
}

.chart-line {
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(31, 111, 95, 0.2), rgba(31, 111, 95, 0.6));
    opacity: 0.7;
}

.chart-point {
    align-self: flex-start;
    font-size: 11px;
    color: #1f6f5f;
    font-weight: 600;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #68707a;
}

.legend-item::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-right: 6px;
}

.legend-keep::before {
    background: #3bb99f;
}

.legend-discard::before {
    background: #d9776f;
}

.legend-gate::before {
    background: #c2a64a;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9aa2ab;
}

.chart-note {
    margin-top: 12px;
    font-size: 12px;
    color: #7a828a;
}

.table-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-row {
    display: grid;
    grid-template-columns: 2.2fr repeat(16, 1fr) 1.4fr;
    gap: 6px;
    font-size: 11px;
    color: #5e666f;
    align-items: center;
}

.table-header {
    font-weight: 600;
    color: #1a1f24;
}

.table-row span {
    white-space: nowrap;
}

.table-row .ok {
    color: #2e9e87;
    font-weight: 700;
}

.mini-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: #5e666f;
}

.mini-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #8a929b;
}

.mini-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.takeaway-list {
    display: grid;
    gap: 14px;
}

.takeaway-item {
    background: #ffffff;
    border: 1px solid #e2e6ec;
    border-radius: 16px;
    padding: 16px 18px;
}

.takeaway-title {
    font-weight: 600;
    color: #1a1f24;
    margin-bottom: 6px;
}

.takeaway-body {
    color: #5e666f;
    line-height: 1.6;
}

.cta-card {
    margin-top: 10px;
    background: linear-gradient(135deg, #e4f5f1, #ffffff);
    border: 1px solid #cfe8e2;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(15, 26, 32, 0.08);
}

.cta-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    color: #5a6b69;
    margin-bottom: 10px;
}

.cta-title {
    font-size: 24px;
    font-weight: 600;
    color: #0f4f43;
    margin-bottom: 12px;
}

.cta-body {
    color: #34514b;
    line-height: 1.7;
    margin-bottom: 16px;
}

.cta-button-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #0f6a59;
    color: #ffffff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
}

.cta-button-light:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.cta-button-light:active {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .cta-button-light:hover,
    .cta-button-light:active {
        transform: none;
    }
}

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

    .article-sidebar {
        position: static;
        order: 2;
    }
}

@media (max-width: 720px) {
    .article-title {
        font-size: 36px;
    }

    .article-hero {
        padding: 16px 0 24px;
    }

    .article-body {
        padding: 28px 0 0;
    }

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

    .table-row {
        grid-template-columns: 1.8fr repeat(4, 1fr);
        gap: 4px;
    }
}
