/* T131 env-b chapter fixes: /page/environment3 (energy & GHG) and /page/environment4 (water & pollution). */

/* Level-2 headings inside rich text use the unified secondary style (icon, 18px, rule below). */
html body.heritage-page-slug--environment3 .page_main .report-richtext h4.drive-heading--secondary,
html body.heritage-page-slug--environment4 .page_main .report-richtext h4.drive-heading--secondary {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 26px 0 12px !important;
    padding: 0 0 8px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--t131-line) !important;
    background: none !important;
    color: var(--t131-accent-dark) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
}
html body.heritage-page-slug--environment3 .page_main .report-richtext > h4.drive-heading--secondary:first-child,
html body.heritage-page-slug--environment4 .page_main .report-richtext > h4.drive-heading--secondary:first-child { margin-top: 0 !important; }
html body.heritage-page-slug--environment3 .page_main .report-richtext h4.drive-heading--secondary > i,
html body.heritage-page-slug--environment4 .page_main .report-richtext h4.drive-heading--secondary > i {
    flex: 0 0 auto;
    color: var(--t131-accent);
    font-size: 1.1em;
    line-height: 1;
}

/* Bulleted points (action effectiveness, stakeholder engagement, ODS plan). */
body.heritage-page-slug--environment3 .page_main .report-richtext > ul,
body.heritage-page-slug--environment4 .page_main .report-richtext > ul {
    display: block !important;
    margin: 0 0 8px;
    padding-left: 1.3em !important;
    list-style: disc outside !important;
}
body.heritage-page-slug--environment3 .page_main .report-richtext > ul > li,
body.heritage-page-slug--environment4 .page_main .report-richtext > ul > li {
    margin: 0 0 6px !important;
    padding: 0 !important;
    border: 0 !important;
    list-style: inherit;
    font-size: inherit;
    line-height: 1.8;
}
body.heritage-page-slug--environment3 .page_main .report-richtext > ul > li::marker,
body.heritage-page-slug--environment4 .page_main .report-richtext > ul > li::marker { color: var(--t131-accent); }

/* Resource KPI titles may carry a second line (scope sub-heading, e.g. "範疇一、範疇二 (台灣區)"). */
body.heritage-page-slug--environment3 .page_main .resource-performance__group h3,
body.heritage-page-slug--environment4 .page_main .resource-performance__group h3 {
    white-space: pre-line;
    color: #2f7d86;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}
body.heritage-page-slug--environment3 .page_main .resource-performance__group h3::first-line {
    color: rgb(82, 106, 117);
    font-size: 24px;
    font-weight: 500;
}
body.heritage-page-slug--environment4 .page_main .resource-performance__group h3::first-line {
    color: rgb(82, 106, 117);
    font-size: 28px;
    font-weight: 500;
}
@media (min-width: 768px) {
    /* Both energy KPI groups keep their artwork on one line even when only one has a sub-heading. */
    body.heritage-page-slug--environment3 .page_main .resource-performance__group h3 { min-height: 3.3em; }
}
@media (max-width: 575.98px) {
    body.heritage-page-slug--environment3 .page_main .resource-performance__group h3,
    body.heritage-page-slug--environment4 .page_main .resource-performance__group h3 { font-size: 14px; }
    body.heritage-page-slug--environment3 .page_main .resource-performance__group h3::first-line,
    body.heritage-page-slug--environment4 .page_main .resource-performance__group h3::first-line { font-size: 21px; }
}

/* Energy table: renewable / non-renewable are sub-items of electricity (Changxing rows 2-3, Suzhou rows 12-13).
   zh slide 63 asks only for right alignment; the blue sub-item shading is from the English content deck (slide 112). */
html[lang="en"] body.heritage-page-slug--environment3 [data-report-module="ppt-2025-slide-56-table-1"] .energy-register__table tbody tr:is(:nth-child(2), :nth-child(3), :nth-child(12), :nth-child(13)) > td {
    background: #eef3fa;
}
body.heritage-page-slug--environment3 [data-report-module="ppt-2025-slide-56-table-1"] .energy-register__table tbody tr:is(:nth-child(2), :nth-child(3), :nth-child(12), :nth-child(13)) > td[data-column="1"] {
    padding-right: 18px;
    text-align: right !important;
}

/* Chinese 7-column metrics table: compact year columns on desktop. */
@media (min-width: 768px) {
    body.heritage-page-slug--environment3 [data-report-module="ppt-2025-slide-55-table-1"] .table-v2-table { width: 100%; table-layout: auto; }
    body.heritage-page-slug--environment3 [data-report-module="ppt-2025-slide-55-table-1"] .table-v2-cell { padding-left: 8px; padding-right: 8px; }
}

/* Water tables: values and labels centred (withdrawal by plant, consumption trend, air pollutants). */
@media (min-width: 768px) {
    body.heritage-page-slug--environment4 :is([data-report-module="ppt-2025-slide-60-table-1"], [data-report-module="ppt-2025-slide-60-table-2"], [data-report-module="ppt-2025-slide-61-table-1"]) .energy-register__table :is(th, td) {
        text-align: center !important;
    }
}

/* English water-risk table: high-risk ratings in red / orange bold, as on slide 115 (Chinese cells are toned by the template). */
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__table tbody tr:nth-child(1) > td[data-column="3"],
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__mobile .energy-register__group:nth-child(1) dl > div:nth-child(3) dd { color: #9d1746; font-weight: 700; }
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__table tbody tr:nth-child(3) > td[data-column="3"],
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__mobile .energy-register__group:nth-child(3) dl > div:nth-child(3) dd { color: #b52e37; font-weight: 700; }
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__table tbody tr:nth-child(3) > td[data-column="4"],
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__table tbody tr:nth-child(4) > td:is([data-column="2"], [data-column="4"]),
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__mobile .energy-register__group:nth-child(3) dl > div:nth-child(4) dd,
html[lang="en"] body.heritage-page-slug--environment4 [data-report-module="ppt-2025-slide-58-table-1"] .energy-register__mobile .energy-register__group:nth-child(4) dl > div:is(:nth-child(2), :nth-child(4)) dd { color: #a05213; font-weight: 700; }

/* English WRI cards: risk level colours matching the Chinese cards. */
html[lang="en"] body.heritage-page-slug--environment4 .water-risks__location[data-facility="nanshan"] article:nth-of-type(1) .water-risk-level,
html[lang="en"] body.heritage-page-slug--environment4 .water-risks__location[data-facility="dongguan"] article .water-risk-level { color: #a05213; }
html[lang="en"] body.heritage-page-slug--environment4 .water-risks__location[data-facility="suzhou"] article:nth-of-type(1) .water-risk-level { color: #9d1746; }
html[lang="en"] body.heritage-page-slug--environment4 .water-risks__location[data-facility="suzhou"] article:nth-of-type(2) .water-risk-level { color: #b52e37; }

/* Water performance cards: icons that match discharge, consumption and consumption rate. */
body.heritage-page-slug--environment4 [data-report-module="report-2025-page-60-water-kpis"] .report-kpi__item:nth-child(n+2) .report-kpi__icon-wrap > svg { display: none; }
body.heritage-page-slug--environment4 [data-report-module="report-2025-page-60-water-kpis"] .report-kpi__item:nth-child(n+2) .report-kpi__icon-wrap::before {
    color: var(--t131-card, #3f9f9b);
    font-family: "tabler-icons" !important;
    font-size: 25px;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}
body.heritage-page-slug--environment4 [data-report-module="report-2025-page-60-water-kpis"] .report-kpi__item:nth-child(2) .report-kpi__icon-wrap::before { content: "\f8ff"; } /* droplet-down: discharge */
body.heritage-page-slug--environment4 [data-report-module="report-2025-page-60-water-kpis"] .report-kpi__item:nth-child(3) .report-kpi__icon-wrap::before { content: "\ee82"; } /* droplet-half: consumption */
body.heritage-page-slug--environment4 [data-report-module="report-2025-page-60-water-kpis"] .report-kpi__item:nth-child(4) .report-kpi__icon-wrap::before { content: "\ecf4"; } /* percentage: consumption rate */
