/* ESG14 page-specific styles. Shared ESG layout and table utilities live in ../esg-theme.css. */
.esg14-page {
    background: var(--esg-color-white);
}

.esg14-page .esg14-page-title {
    padding-top: 20px;
}

.esg14-page .esg14-row-lg {
    padding-top: 30px;
}

.esg14-page .esg14-row-sm {
    padding-top: 5px;
}

.esg14-page .esg14-text-block {
    line-height: 30px;
}

.esg14-page .esg14-heading-col {
    font-size: large;
}

.esg14-page .esg14-section-title {
    color: #1f3864;
}

.esg14-page .esg14-gri-code {
    color: #d71920;
}

.esg14-page .esg14-image-col {
    text-align: center;
}

.esg14-page .esg14-figure-image {
    width: 100%;
    height: auto;
}

.esg14-page .esg14-topic-table,
.esg14-page .esg14-boundary-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--esg-color-white);
    color: #555;
}

.esg14-page .esg14-topic-table th,
.esg14-page .esg14-topic-table td,
.esg14-page .esg14-boundary-table th,
.esg14-page .esg14-boundary-table td {
    border: 1px solid #6d8fc4;
    text-indent: 0;
}

.esg14-page .esg14-topic-table th,
.esg14-page .esg14-boundary-table th {
    background: #3f6db5;
    color: var(--esg-color-white);
    font-weight: 700;
    text-align: center;
}

.esg14-page .esg14-topic-table th {
    background: #446fb8;
    border-color: #7ea0d6;
    padding: 10px 8px;
    font-size: 20px;
}

.esg14-page .esg14-topic-table td {
    border-color: #7ea0d6;
    padding: 8px;
}

.esg14-page .esg14-topic-table .aspect-col { width: 11%; }
.esg14-page .esg14-topic-table .num-col { width: 4%; }
.esg14-page .esg14-topic-table .impact-col { width: 15%; }
.esg14-page .esg14-topic-table .issue-col { width: 25%; }
.esg14-page .esg14-topic-table .material-col { width: 45%; }

.esg14-page .esg14-center-cell {
    text-align: center;
}

.esg14-page .esg14-aspect-cell {
    --aspect-color: #4069b7;
    vertical-align: middle;
    text-align: center;
}

.esg14-page .esg14-aspect-env,
.esg14-page .esg14-major-env {
    --aspect-color: #43bebe;
    background: #edf6f5;
}

.esg14-page .esg14-aspect-social,
.esg14-page .esg14-major-social {
    --aspect-color: #f4a232;
    background: #fbf4eb;
}

.esg14-page .esg14-aspect-governance,
.esg14-page .esg14-major-governance {
    --aspect-color: #4069b7;
    background: #f1f3f8;
}

/* 構面標籤：原本是 54px 大字母 + 直書名稱，兩者不在同一中心軸。
   改為「圓形色塊字母 + 下方橫書名稱」，置中於格內 */
.esg14-page .esg14-aspect-letter {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--aspect-color);
    color: var(--esg-color-white);
    font-size: 30px;
    font-weight: 700;
    line-height: 56px;
}

.esg14-page .esg14-aspect-name {
    margin-top: 10px;
    color: var(--aspect-color);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.esg14-page .esg14-major-cell {
    padding: 10px 18px;
    vertical-align: middle;
    line-height: 1.9;
}

.esg14-page .esg14-major-cell-large {
    padding: 14px 18px;
}

/* 議題項目：徽章固定在左，換行文字對齊在徽章右側（不跑到徽章下方） */
.esg14-page .esg14-topic-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0;
}

.esg14-page .esg14-major-cell > .esg14-topic-item:only-child {
    margin: 0;
}

.esg14-page .esg14-topic-item-spaced {
    margin: 14px 0;
}

.esg14-page .esg14-topic-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    margin-top: 3px; /* 對齊第一行文字：行高 1.9 × 16px ≈ 30px，(30 - 24) / 2 */
    border-radius: 50%;
    background: var(--aspect-color);
    color: var(--esg-color-white);
    font-size: 15px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    vertical-align: middle;
}

/* 影響類型：符號放進固定寬度的格子，換行文字對齊在符號右側。
   四種符號來自不同字型（🟢 是彩色 emoji），實測墨跡高度（100px 時）：🟢 102、○ 78、▲ 70、△ 40。
   依此個別調整字級，讓墨跡都約 0.70em；再用 top 讓墨跡中心都在基線上方約 0.36em。
   ponytail: 校正值以 Windows 的 Microsoft JhengHei / Segoe UI Emoji 量測；其他系統字型不同時可能略有差異 */
.esg14-page .esg14-impact {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.esg14-page .esg14-impact-icon {
    flex: 0 0 18px;
    position: relative;
    line-height: 1;
    text-align: center;
}

.esg14-page .esg14-icon-ap { font-size: 0.8em; top: -0.09em; }    /* 🟢 實際正面（圓形視覺上比三角形大，直徑取約 10px） */
.esg14-page .esg14-icon-pp { font-size: 1.04em; top: 0.034em; }   /* ○ 潛在正面 */
.esg14-page .esg14-icon-an { font-size: 1em; top: -0.01em; }      /* ▲ 實際負面 */
.esg14-page .esg14-icon-pn { font-size: 1.75em; top: 0.204em; }   /* △ 潛在負面 */

.esg14-page .esg14-table-note {
    margin-top: 12px;
    padding: 0 2px;
    color: #666;
    font-size: 14px;
    line-height: 1.9;
}

.esg14-page .esg14-restatement-note ol {
    margin: 6px 0 0 24px;
    padding-left: 18px;
}

.esg14-page .esg14-restatement-note li {
    padding-left: 4px;
}

.esg14-page .esg14-boundary-wrap {
    overflow-x: auto;
}

.esg14-page .esg14-boundary-table {
    width: 100%;
    min-width: 1530px; /* 欄寬依實測文字最小寬度加約 15px 留白，合計約 1524px，超出內容區由外層 overflow-x 橫向捲動 */
    font-size: 12px;
    line-height: 1.55;
}

.esg14-page .esg14-boundary-table th {
    padding: 8px 4px;
}

.esg14-page .esg14-boundary-table td {
    padding: 8px 6px;
    vertical-align: middle;
}

.esg14-page .esg14-boundary-table .head-row th {
    padding: 6px 4px;
}

.esg14-page .esg14-boundary-table tr.env-row { background: #dfe8e6; }
.esg14-page .esg14-boundary-table tr.social-row { background: #eee7df; }
.esg14-page .esg14-boundary-table tr.governance-row { background: #dfe4eb; }

.esg14-page .esg14-boundary-table th:nth-child(1),
.esg14-page .esg14-boundary-table td:nth-child(1) {
    width: 96px;
    text-align: center;
    white-space: normal;
}
.esg14-page .esg14-boundary-table th:nth-child(2),
.esg14-page .esg14-boundary-table td:nth-child(2) { width: 110px; text-align: center; font-weight: 700; }
.esg14-page .esg14-boundary-table th:nth-child(3),
.esg14-page .esg14-boundary-table td:nth-child(3) { width: 250px; }
.esg14-page .esg14-boundary-table th:nth-child(4),
.esg14-page .esg14-boundary-table td:nth-child(4) { width: 140px; }
.esg14-page .esg14-boundary-table th:nth-child(5),
.esg14-page .esg14-boundary-table td:nth-child(5) { width: 250px; }
.esg14-page .esg14-boundary-table th:nth-child(6),
.esg14-page .esg14-boundary-table td:nth-child(6),
.esg14-page .esg14-boundary-table th:nth-child(7),
.esg14-page .esg14-boundary-table td:nth-child(7),
.esg14-page .esg14-boundary-table th:nth-child(8),
.esg14-page .esg14-boundary-table td:nth-child(8) { width: 96px; text-align: center; }
.esg14-page .esg14-boundary-table th:nth-child(9),
.esg14-page .esg14-boundary-table td:nth-child(9),
.esg14-page .esg14-boundary-table th:nth-child(10),
.esg14-page .esg14-boundary-table td:nth-child(10),
.esg14-page .esg14-boundary-table th:nth-child(11),
.esg14-page .esg14-boundary-table td:nth-child(11) { width: 130px; }

.esg14-page .esg14-boundary-table thead tr:first-child th:nth-child(9) {
    width: 390px;
}

.esg14-page .esg14-boundary-table thead tr:nth-child(2) th:nth-child(1),
.esg14-page .esg14-boundary-table thead tr:nth-child(2) th:nth-child(2),
.esg14-page .esg14-boundary-table thead tr:nth-child(2) th:nth-child(3) {
    width: 130px;
}


/* Process for Determining Material Issues - laid out like docx 1.x figure:
   chevron stage band on the left, each step a colored rounded card
   (icon + label block | description), a solid arrow, then a rounded result box. */
.esg14-page .esg14-process-flow {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 14px;
    width: 100%;
}

.esg14-page .esg14-process-stage {
    --notch: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--notch) + 8px) 8px;
    background: #4a7db5;
    color: var(--esg-color-white);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.2;
    text-align: center;
    text-indent: 0;
    writing-mode: vertical-rl;
    /* pointed bottom; the next stage gets a matching notch on top */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--notch)), 50% 100%, 0 calc(100% - var(--notch)));
}

.esg14-page .esg14-stage-analysis {
    clip-path: polygon(0 0, 50% var(--notch), 100% 0, 100% calc(100% - var(--notch)), 50% 100%, 0 calc(100% - var(--notch)));
}

.esg14-page .esg14-stage-confirm {
    clip-path: polygon(0 0, 50% var(--notch), 100% 0, 100% 100%, 0 100%);
}

.esg14-page .esg14-stage-identify { grid-row: span 2; }
.esg14-page .esg14-stage-analysis { grid-row: span 3; }
.esg14-page .esg14-stage-confirm { grid-row: span 1; }

.esg14-page .esg14-process-step {
    --step-color: #45b5d0;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 64px minmax(150px, 19%);
    align-items: stretch;
    min-width: 0;
}

.esg14-page .esg14-step-cyan { --step-color: #45b5d0; }
.esg14-page .esg14-step-teal { --step-color: #1ea39a; }
.esg14-page .esg14-step-green { --step-color: #7cc35b; }
.esg14-page .esg14-step-orange { --step-color: #f5a742; }
.esg14-page .esg14-step-coral { --step-color: #ec6f55; }
.esg14-page .esg14-step-pink { --step-color: #e7517b; }

.esg14-page .esg14-step-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 14px 10px;
    border-radius: 14px 0 0 14px;
    background: var(--step-color);
    color: var(--esg-color-white);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-indent: 0;
}

.esg14-page .esg14-step-icon {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.esg14-page .esg14-step-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 14px 20px;
    border: 2px solid var(--step-color);
    border-left: 0;
    border-radius: 0 14px 14px 0;
    background: var(--esg-color-white);
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    text-indent: 0;
}

/* Solid arrow sits in the 64px column between card and result */
.esg14-page .esg14-step-result {
    position: relative;
    grid-column: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 12px 14px;
    border: 2px solid var(--step-color);
    border-radius: 14px;
    background: var(--esg-color-white);
    color: var(--step-color);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-indent: 0;
}

.esg14-page .esg14-step-result::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -54px;
    width: 44px;
    height: 34px;
    transform: translateY(-50%);
    background: var(--step-color);
    clip-path: polygon(0 28%, 55% 28%, 55% 0, 100% 50%, 55% 100%, 55% 72%, 0 72%);
}

/* Narrow screens: stage band becomes a horizontal header, each step stacks
   (label block on top, description, arrow pointing down, result) */
@media (max-width: 900px) {
    .esg14-page .esg14-process-flow {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 12px;
    }

    .esg14-page .esg14-process-stage,
    .esg14-page .esg14-stage-analysis,
    .esg14-page .esg14-stage-confirm {
        grid-row: auto;
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: 10px;
        writing-mode: horizontal-tb;
        clip-path: none;
    }

    .esg14-page .esg14-process-step {
        grid-template-columns: minmax(0, 1fr);
    }

    .esg14-page .esg14-step-label {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 14px;
        border-radius: 14px 14px 0 0;
        font-size: 17px;
        text-align: left;
    }

    .esg14-page .esg14-step-icon {
        width: 34px;
        height: 34px;
        flex: none;
    }

    .esg14-page .esg14-step-body {
        padding: 12px 14px;
        border-left: 2px solid var(--step-color);
        border-top: 0;
        border-radius: 0 0 14px 14px;
        font-size: 15px;
    }

    .esg14-page .esg14-step-result {
        grid-column: 1;
        margin-top: 44px;
        font-size: 17px;
    }

    .esg14-page .esg14-step-result::before {
        top: -40px;
        left: 50%;
        width: 34px;
        height: 32px;
        transform: translateX(-50%) rotate(90deg);
    }
}

/* List of Material Topics - laid out like the docx figure: grey tab headers,
   E / S / G as separate rounded groups (solid colour block + tinted rows),
   no grid lines except a coloured rule between material-topic groups.
   Overrides the older bordered-table rules above. */
.esg14-page .esg14-topic-table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    color: #333;
}

.esg14-page .esg14-topic-table th,
.esg14-page .esg14-topic-table td {
    border: 0;
}

.esg14-page .esg14-topic-table .aspect-col { width: 17%; }
.esg14-page .esg14-topic-table .num-col { width: 5%; }
.esg14-page .esg14-topic-table .impact-col { width: 17%; }
.esg14-page .esg14-topic-table .issue-col { width: 33%; }
.esg14-page .esg14-topic-table .material-col { width: 28%; }

.esg14-page .esg14-topic-table thead th {
    padding: 0 0 8px;
    background: transparent;
}

.esg14-page .esg14-head-tab {
    display: block;
    margin: 0 8px;
    padding: 8px 12px;
    border-radius: 14px 14px 0 0;
    background: #a3a6ab;
    color: var(--esg-color-white);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.esg14-page .esg14-gap td {
    height: 14px;
    padding: 0;
    background: transparent;
}

.esg14-page .esg14-group {
    --g-color: #7dbf7a;
    --g-soft: #eef6ee;
}

.esg14-page .esg14-group-soc { --g-color: #f2a24a; --g-soft: #fdf1e5; }
.esg14-page .esg14-group-gov { --g-color: #4f87b6; --g-soft: #eaf1f7; }

.esg14-page .esg14-group td {
    padding: 8px 10px;
    background: var(--g-soft);
    font-size: 16px;
    line-height: 1.5;
    vertical-align: middle;
}

/* coloured rule where a new material topic starts (row holding a major cell) */
.esg14-page .esg14-group tr:not(:first-child):has(> .esg14-major-cell) > td {
    border-top: 1px solid var(--g-color);
}

.esg14-page .esg14-group .esg14-left-cell + .esg14-center-cell {
    text-align: left;
}

/* Group corners */
.esg14-page .esg14-group .esg14-aspect-cell {
    border-radius: 18px 0 0 18px;
}

.esg14-page .esg14-group tr:first-child > td:last-child {
    border-top-right-radius: 18px;
}

.esg14-page .esg14-group tr:last-child > td:last-child {
    border-bottom-right-radius: 18px;
}

/* Solid colour block: big letter + name, line icon */
.esg14-page .esg14-group .esg14-aspect-cell {
    padding: 16px 12px;
    background: var(--g-color);
    color: var(--esg-color-white);
    text-align: center;
}

.esg14-page .esg14-aspect-letter {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: var(--esg-color-white);
    font-size: 56px;
    line-height: 1;
}

.esg14-page .esg14-aspect-name {
    margin-top: 4px;
    color: var(--esg-color-white);
    font-size: 18px;
}

.esg14-page .esg14-aspect-icon {
    display: block;
    width: 64px;
    height: 64px;
    margin: 14px auto 0;
    fill: none;
    stroke: var(--esg-color-white);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Material topics: plain text like the docx (no numbered badge) */
.esg14-page .esg14-group .esg14-major-cell {
    padding: 8px 16px;
    background: var(--g-soft);
    line-height: 1.5;
}

.esg14-page .esg14-group .esg14-topic-badge {
    display: none;
}

/* Impact type: drawn shapes instead of mixed-font glyphs, coloured label */
.esg14-page .esg14-impact {
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.esg14-page .esg14-impact-icon {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    top: 0;
    font-size: 0;
    background: center / contain no-repeat;
}

.esg14-page .esg14-icon-ap { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.5' fill='%2319a596'/%3E%3C/svg%3E"); }
.esg14-page .esg14-icon-pp { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='5.5' fill='none' stroke='%237cc35b' stroke-width='2'/%3E%3C/svg%3E"); }
.esg14-page .esg14-icon-an { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1l6.5 12H.5z' fill='%23e7517b'/%3E%3C/svg%3E"); }
.esg14-page .esg14-icon-pn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 2.2l5.6 10.3H1.4z' fill='none' stroke='%23f08a4b' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.esg14-page .esg14-icon-ap + span { color: #19a596; }
.esg14-page .esg14-icon-pp + span { color: #6bb34a; }
.esg14-page .esg14-icon-an + span { color: #e7517b; }
.esg14-page .esg14-icon-pn + span { color: #f08a4b; }

/* Phones: keep the figure's grid, scroll sideways inside the wrapper */
@media (max-width: 768px) {
    .esg14-page .esg14-topic-table {
        min-width: 860px;
        table-layout: fixed !important;
    }
}
