/* Lightweight, article-specific equations and code-rendered data visuals. */
.single-article__body .pe-article-formula {
    display: grid;
    gap: 28px;
    margin: 32px 0 !important;
    padding: clamp(26px, 4vw, 40px);
    border: 1px solid var(--pe-line);
    border-left: 5px solid var(--pe-orange);
    border-radius: 16px;
    background: var(--pe-soft);
}

.single-article__body .pe-article-formula__title {
    margin: 0 !important;
    color: var(--pe-purple);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.45;
}

.single-article__body .pe-article-formula__equation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--pe-ink);
    font-size: clamp(27px, 3.3vw, 34px);
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.single-article__body .pe-article-formula__fraction {
    display: inline-grid;
    max-width: 100%;
    color: var(--pe-ink);
    font-size: clamp(22px, 2.6vw, 27px);
    font-weight: 650;
    line-height: 1.45;
    text-align: center;
}

.single-article__body .pe-article-formula__fraction span:first-child {
    padding: 0 14px 8px;
    border-bottom: 2px solid var(--pe-purple);
}

.single-article__body .pe-article-formula__fraction span:last-child {
    padding: 8px 14px 0;
}

.single-article__body .pe-article-formula__operator {
    color: var(--pe-orange-dark);
    font-size: 1.15em;
    font-weight: 800;
    white-space: nowrap;
}

.single-article__body .pe-article-formula__term {
    max-width: 100%;
    color: var(--pe-ink);
}

.single-article__body .pe-article-usage__examples {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.single-article__body .pe-article-usage__example {
    display: grid;
    min-width: 0;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--pe-line);
    border-radius: 12px;
    background: var(--pe-white);
}

.single-article__body .pe-article-usage__heading {
    margin: 0 0 2px !important;
    color: var(--pe-purple);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.single-article__body .pe-article-usage__row,
.single-article__body .pe-article-usage__result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0 !important;
    color: var(--pe-ink);
    font-size: 16px;
    line-height: 1.4;
}

.single-article__body .pe-article-usage__row strong,
.single-article__body .pe-article-usage__result strong {
    flex: 0 0 auto;
    font-weight: 800;
}

.single-article__body .pe-article-usage__result {
    margin-top: 3px !important;
    padding-top: 10px;
    border-top: 1px solid var(--pe-line);
    color: var(--pe-purple);
    font-weight: 700;
}

.single-article__body .pe-article-usage__result strong {
    color: var(--pe-orange-dark);
    font-size: 18px;
}

.single-article__body .pe-article-usage__note {
    margin: 0 !important;
    color: var(--pe-muted);
    font-size: 14px;
    line-height: 1.45;
}

.single-article__body .pe-article-formula--compact {
    gap: 28px;
}

.single-article__body .pe-article-chart {
    margin: 52px 0 58px !important;
    padding: 24px 0 0;
    border-top: 1px solid var(--pe-line);
    border-bottom: 1px solid var(--pe-line);
}

.single-article__body .pe-article-chart__eyebrow {
    margin: 0 0 5px !important;
    color: var(--pe-muted);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.045em;
    line-height: 1.4;
    text-transform: uppercase;
}

.single-article__body .pe-article-chart__title {
    margin: 0 0 18px !important;
    color: var(--pe-ink);
    font-family: 'Baloo 2', sans-serif;
    font-size: clamp(27px, 3.2vw, 32px);
    font-weight: 700;
    line-height: 1.25;
}

.single-article__body .pe-article-chart__note {
    margin: 14px 0 18px !important;
    color: var(--pe-muted);
    font-size: 17px;
    line-height: 1.6;
}

.single-article__body .pe-profile-chart__legend,
.single-article__body .pe-scenario-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0 0 12px;
    color: var(--pe-ink);
    font-size: 17px;
}

.single-article__body .pe-profile-chart__legend span,
.single-article__body .pe-scenario-chart__legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.single-article__body .pe-profile-chart__swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.single-article__body .pe-profile-chart__swatch--pv {
    background: var(--pe-orange);
}

.single-article__body .pe-profile-chart__swatch--load {
    background: var(--pe-purple);
}

.single-article__body .pe-profile-chart__plot,
.single-article__body .pe-scenario-chart__plot {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
}

.single-article__body .pe-profile-chart__axis {
    display: flex;
    height: 352px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 0 36px;
    color: var(--pe-muted);
    font-size: 14px;
    line-height: 1;
    text-align: right;
}

.single-article__body .pe-profile-chart__groups {
    display: grid;
    height: 352px;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    border-bottom: 1px solid var(--pe-ink);
    background-image: linear-gradient(to bottom, var(--pe-line) 1px, transparent 1px);
    background-size: 100% 25%;
}

.single-article__body .pe-profile-chart__slot {
    position: relative;
    min-width: 0;
}

.single-article__body .pe-profile-chart__bars {
    position: absolute;
    inset: 0 1px 36px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.single-article__body .pe-profile-chart__bar {
    display: block;
    width: min(40%, 26px);
    min-height: 2px;
}

.single-article__body .pe-profile-chart__bar--pv,
.single-article__body .pe-scenario-chart__bar--auto {
    background: var(--pe-orange);
}

.single-article__body .pe-profile-chart__bar--load,
.single-article__body .pe-scenario-chart__bar--cover {
    background: var(--pe-purple);
}

.single-article__body .pe-profile-chart__bar--v0 { height: 0; }
.single-article__body .pe-profile-chart__bar--v10 { height: 10%; }
.single-article__body .pe-profile-chart__bar--v20 { height: 20%; }
.single-article__body .pe-profile-chart__bar--v24 { height: 24%; }
.single-article__body .pe-profile-chart__bar--v25 { height: 25%; }
.single-article__body .pe-profile-chart__bar--v45 { height: 45%; }
.single-article__body .pe-profile-chart__bar--v52 { height: 52%; }
.single-article__body .pe-profile-chart__bar--v58 { height: 58%; }
.single-article__body .pe-profile-chart__bar--v61 { height: 61%; }
.single-article__body .pe-profile-chart__bar--v62 { height: 62%; }
.single-article__body .pe-profile-chart__bar--v72 { height: 72%; }
.single-article__body .pe-profile-chart__bar--v75 { height: 75%; }
.single-article__body .pe-profile-chart__bar--v76 { height: 76%; }
.single-article__body .pe-profile-chart__bar--v78 { height: 78%; }
.single-article__body .pe-profile-chart__bar--v82 { height: 82%; }
.single-article__body .pe-profile-chart__bar--v86 { height: 86%; }
.single-article__body .pe-profile-chart__bar--v100 { height: 100%; }

.single-article__body .pe-profile-chart__time {
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;
    color: var(--pe-muted);
    font-size: 14px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.single-article__body .pe-profile-chart__shifts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 11px 0 0 50px;
    color: var(--pe-muted);
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
}

.single-article__body .pe-profile-chart__shifts span + span {
    border-left: 1px dashed var(--pe-line);
}

.single-article__body .pe-scenario-chart__axis {
    display: flex;
    height: 302px;
    flex-direction: column;
    justify-content: space-between;
    color: var(--pe-muted);
    font-size: 14px;
    line-height: 1;
    text-align: right;
}

.single-article__body .pe-scenario-chart__groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 4vw, 44px);
}

.single-article__body .pe-scenario-chart__group {
    min-width: 0;
}

.single-article__body .pe-scenario-chart__bars {
    display: flex;
    height: 302px;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid var(--pe-ink);
    background-image: linear-gradient(to bottom, var(--pe-line) 1px, transparent 1px);
    background-size: 100% 20%;
}

.single-article__body .pe-scenario-chart__bar {
    display: block;
    width: min(30%, 48px);
    min-height: 2px;
}

.single-article__body .pe-scenario-chart__bar--v12 { height: 12%; }
.single-article__body .pe-scenario-chart__bar--v17 { height: 17%; }
.single-article__body .pe-scenario-chart__bar--v20 { height: 20%; }
.single-article__body .pe-scenario-chart__bar--v63 { height: 63%; }
.single-article__body .pe-scenario-chart__bar--v73 { height: 73%; }
.single-article__body .pe-scenario-chart__bar--v83 { height: 83%; }

.single-article__body .pe-scenario-chart__caption {
    display: grid;
    gap: 4px;
    margin: 8px 0 0 !important;
    color: var(--pe-muted);
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

.single-article__body .pe-scenario-chart__caption strong {
    color: var(--pe-ink);
    font-size: 18px;
}

.single-article__body .pe-energy-flow__timeline {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 0 !important;
    padding: 10px 28px;
    border: 1px solid var(--pe-line);
    border-radius: 16px;
    background: var(--pe-white);
    list-style: none;
}

.single-article__body .pe-energy-flow__timeline li {
    position: static;
    margin: 0;
    padding: 0;
}

.single-article__body .pe-energy-flow__timeline li::before {
    content: none;
}

.single-article__body .pe-energy-flow__step {
    display: grid;
    grid-template-columns: 52px minmax(190px, 0.78fr) minmax(0, 1.22fr);
    grid-template-rows: min-content min-content;
    align-items: start;
    align-content: center;
    gap: 9px 28px;
    min-width: 0;
    min-height: 112px;
    padding: 22px 0;
    border-bottom: 1px solid var(--pe-line);
}

.single-article__body .pe-energy-flow__step:last-child {
    border-bottom: 0;
}

.single-article__body .pe-energy-flow__number {
    display: grid;
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 13px;
    background: var(--pe-orange-soft);
    color: var(--pe-orange-dark);
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}

.single-article__body .pe-energy-flow__step--storage .pe-energy-flow__number {
    background: var(--pe-soft);
    color: var(--pe-purple);
}

.single-article__body .pe-energy-flow__period {
    grid-column: 2;
    grid-row: 1;
    margin: 0 !important;
    color: var(--pe-muted);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.single-article__body .pe-energy-flow__heading {
    grid-column: 2;
    grid-row: 2;
    margin: 0 !important;
    color: var(--pe-ink);
    font-family: 'Baloo 2', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.single-article__body .pe-energy-flow__copy {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    margin: 0 !important;
    color: var(--pe-text);
    font-size: 19px;
    line-height: 1.6;
}

.single-article__body .pe-energy-flow__grid-note {
    display: grid;
    grid-template-columns: minmax(170px, 0.32fr) minmax(0, 1fr);
    gap: 16px 26px;
    align-items: baseline;
    margin-top: 24px;
    padding: 22px 26px;
    border-left: 4px solid var(--pe-purple);
    border-radius: 0 12px 12px 0;
    background: var(--pe-soft);
}

.single-article__body .pe-energy-flow__grid-label,
.single-article__body .pe-energy-flow__grid-copy {
    margin: 0 !important;
}

.single-article__body .pe-energy-flow__grid-label {
    color: var(--pe-purple);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
}

.single-article__body .pe-energy-flow__grid-copy {
    color: var(--pe-text);
    font-size: 18px;
    line-height: 1.6;
}

.single-article__body .pe-energy-flow {
    margin: 68px 0 74px !important;
    padding-top: 32px;
}

.single-article__body .pe-energy-flow .pe-article-chart__title {
    margin-bottom: 26px !important;
}

@media (max-width: 640px) {
    .single-article__body .pe-article-formula,
    .single-article__body .pe-article-formula--compact {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 24px;
    }

    .single-article__body .pe-article-formula__equation {
        justify-content: center;
        gap: 9px 12px;
        font-size: 26px;
        text-align: center;
    }

    .single-article__body .pe-article-formula__fraction {
        font-size: 22px;
    }

    .single-article__body .pe-article-usage__examples {
        grid-template-columns: minmax(0, 1fr);
    }

    .single-article__body .pe-article-usage__example {
        padding: 16px;
    }

    .single-article__body .pe-profile-chart__axis {
        height: 300px;
        font-size: 13px;
    }

    .single-article__body .pe-profile-chart__groups {
        height: 300px;
        grid-template-columns: repeat(9, minmax(0, 1fr));
    }

    .single-article__body .pe-profile-chart__bar {
        width: 38%;
    }

    .single-article__body .pe-profile-chart__shifts {
        margin-left: 50px;
        font-size: 13px;
    }

    .single-article__body .pe-scenario-chart__plot {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 6px;
    }

    .single-article__body .pe-scenario-chart__axis {
        height: 244px;
        font-size: 13px;
    }

    .single-article__body .pe-scenario-chart__groups {
        gap: 8px;
    }

    .single-article__body .pe-scenario-chart__bars {
        height: 244px;
        gap: 4px;
    }

    .single-article__body .pe-scenario-chart__caption {
        font-size: 14px;
    }

    .single-article__body .pe-scenario-chart__caption strong {
        font-size: 16px;
    }

    .single-article__body .pe-energy-flow__timeline {
        padding: 6px 20px;
    }

    .single-article__body .pe-energy-flow__step {
        grid-template-columns: 46px minmax(0, 1fr);
        grid-template-rows: min-content min-content min-content;
        align-content: start;
        gap: 7px 16px;
        min-height: 0;
        padding: 22px 0;
    }

    .single-article__body .pe-energy-flow__number {
        grid-column: 1;
        grid-row: 1 / 4;
        align-self: center;
        width: 44px;
        height: 44px;
    }

    .single-article__body .pe-energy-flow__period {
        grid-column: 2;
        grid-row: 1;
    }

    .single-article__body .pe-energy-flow__heading {
        grid-column: 2;
        grid-row: 2;
        font-size: 23px;
    }

    .single-article__body .pe-energy-flow__copy {
        grid-column: 2;
        grid-row: 3;
        margin-top: 4px !important;
        font-size: 18px;
    }

    .single-article__body .pe-energy-flow__grid-note {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
        margin-top: 20px;
        padding: 20px 21px;
    }

    .single-article__body .pe-energy-flow {
        margin: 48px 0 54px !important;
        padding-top: 24px;
    }

    .single-article__body .pe-energy-flow .pe-article-chart__title {
        margin-bottom: 20px !important;
    }
}
