/* T131 env-a chapter fixes: /page/environment, /page/policy1, /page/environment2 (TCFD). */

/* environment: English "Environmental Investment" card shows NT$ before the amount, as in the English deck. */
html[lang="en"] body.heritage-page-slug--environment .page_main .report-module[data-report-module="report-2025-page-49-environment-investment-kpis"] .report-kpi__item:first-child .report-kpi__value > span { order: -1; }

/* environment: English investment table has a two-row header (deck slide 96); both rows share the header colour. */
html body.heritage-page-slug--environment .page_main .report-module[data-report-module="ppt-2025-slide-50-table-1"] thead tr + tr th { background: rgb(101, 122, 36) !important; color: #fff !important; }

/* environment2: the four TCFD pillars (Governance / Strategy / Risk Management / Metrics and Targets) are the page's main headings. */
html body.heritage-page-slug--environment2 .page_main .report-module:is([data-report-module="r0912-climate-governance"], [data-report-module="original-climate-context-strategy"], [data-report-module="original-climate-context-management"], [data-report-module="original-climate-context-baseline"]) > .report-module__header {
    margin: 0 0 22px !important;
    padding: 16px 22px !important;
    border: 0 !important;
    border-left: 7px solid var(--t131-accent-dark) !important;
    border-radius: 4px !important;
    background: linear-gradient(90deg, var(--t131-accent) 0%, color-mix(in srgb, var(--t131-accent) 72%, #fff) 100%) !important;
    box-shadow: 0 8px 18px rgb(45 106 62 / 16%) !important;
}
html body.heritage-page-slug--environment2 .page_main .report-module:is([data-report-module="r0912-climate-governance"], [data-report-module="original-climate-context-strategy"], [data-report-module="original-climate-context-management"], [data-report-module="original-climate-context-baseline"]) > .report-module__header > h3.report-module__title {
    color: #fff !important;
    font-size: 25px !important;
    font-weight: 800 !important;
    letter-spacing: .02em !important;
}
html body.heritage-page-slug--environment2 .page_main .report-module:is([data-report-module="r0912-climate-governance"], [data-report-module="original-climate-context-strategy"], [data-report-module="original-climate-context-management"], [data-report-module="original-climate-context-baseline"]) > .report-module__header > h3.report-module__title > :is(svg, i) { color: #fff !important; }

/* environment2: "Climate risk and opportunity assessment" heading sits directly above its table, like "Risk management process". */
html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="ppt-2025-slide-52-copy"] > .report-module__body:empty,
html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="original-climate-context-baseline"] > .report-module__body:empty { display: none !important; }
html body.heritage-page-slug--environment2 .page_main .report-module-anchor#ppt-2025-slide-52-risk-table,
html body.heritage-page-slug--environment2 .page_main .report-module-anchor#report-2025-page-52-climate-target-kpis { margin-top: calc(-1 * clamp(32px, 4vw, 56px)) !important; }
html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="ppt-2025-slide-52-risk-table"] .table-v2-shell { margin-top: 0 !important; }

/* environment2: climate target cards follow the deck ("Cumulative Reduction" above "28%"). */
html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-52-climate-target-kpis"] .report-kpi__value strong { white-space: pre-line !important; }
html[lang="en"] body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-52-climate-target-kpis"] .report-kpi__value strong { display: block; }
html[lang="en"] body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-52-climate-target-kpis"] .report-kpi__value strong::first-line { font-size: 17px; font-weight: 700; line-height: 1.6; }

/* environment2: tighter line and paragraph spacing in the sensitivity-analysis copy. */
html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="ppt-2025-slide-53-copy"] .report-module__body p { margin-bottom: 8px !important; line-height: 1.6 !important; }

@media (max-width: 575.98px) {
    html body.heritage-page-slug--environment2 .page_main .report-module-anchor#ppt-2025-slide-52-risk-table,
    html body.heritage-page-slug--environment2 .page_main .report-module-anchor#report-2025-page-52-climate-target-kpis { margin-top: -30px !important; }
    html body.heritage-page-slug--environment2 .page_main .report-module:is([data-report-module="r0912-climate-governance"], [data-report-module="original-climate-context-strategy"], [data-report-module="original-climate-context-management"], [data-report-module="original-climate-context-baseline"]) > .report-module__header { padding: 13px 16px !important; }
    html body.heritage-page-slug--environment2 .page_main .report-module:is([data-report-module="r0912-climate-governance"], [data-report-module="original-climate-context-strategy"], [data-report-module="original-climate-context-management"], [data-report-module="original-climate-context-baseline"]) > .report-module__header > h3.report-module__title { font-size: 21px !important; }
}

/* environment2: deck slide 55 crosses out the item lists under the climate risk / opportunity matrices; the matrices stay
   (production mobile shows the list instead of the wide matrix, so the list is kept there). */
@media (min-width: 768px) {
    html body.heritage-page-slug--environment2 .page_main .report-module:is([data-report-module="ppt-2025-slide-52-original-risk"], [data-report-module="ppt-2025-slide-52-original-opportunity"]) .climate-assessment__list { display: none !important; }
}

/* environment2: deck slide 53 "優化流程圖設計" - the six risk-management steps read as one left-to-right chevron process. */
@media (min-width: 768px) {
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__viewport { height: auto !important; border: 0 !important; overflow: visible !important; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__stage { width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important; transform: none !important; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__links { display: none !important; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__nodes { position: static !important; display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 4px; padding: 4px 0; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__node {
        position: relative !important; left: auto !important; top: auto !important; width: auto !important; min-height: 128px !important;
        display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px;
        padding: 18px 24px 16px 34px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
        background: var(--t131-env-a-step, #2d6a3e) !important; text-align: center;
        clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%, 22px 50%);
    }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__node:first-child { padding-left: 18px !important; border-radius: 6px 0 0 6px !important; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__node:nth-child(2) { --t131-env-a-step: #2f6f4b; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__node:nth-child(3) { --t131-env-a-step: #2e7258; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__node:nth-child(4) { --t131-env-a-step: #2b7265; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__node:nth-child(5) { --t131-env-a-step: #287172; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__node:nth-child(6) { --t131-env-a-step: #246e7f; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__icon { width: 46px; height: 46px; border: 0; background: rgb(255 255 255 / 16%); color: #fff; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__icon-svg { width: 26px; height: 26px; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__copy { text-align: center; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__label { margin: 0 0 2px; color: rgb(255 255 255 / 82%); font-size: 13px; letter-spacing: .08em; }
    html body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__copy > strong { color: #fff; font-size: 17px; line-height: 1.35; }
    html[lang="en"] body.heritage-page-slug--environment2 .page_main .report-module[data-report-module="report-2025-page-50-climate-risk-flow"] .report-flow__copy > strong { font-size: 15px; }
}
