.esg21-page .esg21-block {
    width: 100%;
    margin: 0 auto;
    font-family: var(--esg-font-family);
    color: var(--esg-color-muted);
}

.esg21-page .esg21-block-management {
    background: #f7f7f7;
}


.esg21-page ul,
.esg21-page .esg21-management-table ul {
    list-style: disc;
    list-style-position: outside;
    padding-left: 1.2em;
}

    .esg21-page ul li,
    .esg21-page .esg21-management-table ul li {
        list-style: disc;
        display: list-item;
    }

.esg21-page .esg21-block-financial {
    background: var(--esg-color-white);
}

/* 年份標題與下方數字一樣靠右對齊 */
.esg21-page .esg21-financial-table thead th:nth-last-child(-n+4) {
    text-align: right !important;
    padding-right: 16px !important;
}

.esg21-page .esg21-block-investment {
    width: 91%;
    margin: 0 auto;
}

.esg21-page .esg21-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.esg21-page .esg-chart-card {
    background: transparent;
    border: 1px solid var(--esg-border-green-soft);
}

/* 用「最後 4 格」而非「第 3 格起」：rowspan 底下的列少一格，第 3 格起會漏掉 2022 欄 */
.esg21-page .esg21-financial-table tbody td:nth-last-child(-n+4) {
    text-align: right !important;
    padding-right: 16px !important;
    font-variant-numeric: tabular-nums;
}

.esg21-page .esg21-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--esg-color-subtle);
}

.esg21-page .esg21-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.esg21-page .esg21-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.esg21-page .esg21-legend .dot.revenue { background: var(--esg-color-chart-orange); }
.esg21-page .esg21-legend .dot.profit { background: #3f69b1; }
.esg21-page .esg21-legend .dot.stock { background: #4fb7bb; }

.esg21-page .esg21-bar-chart {
    --esg-bar-chart-axis-left: 72px;
    --esg-bar-chart-axis-top: 24px;
    --esg-bar-chart-axis-offset: 76px;
    --esg-bar-chart-height: 240px;
    --esg-bar-chart-columns: 4;
    --esg-bar-chart-gap: 12px;
    --esg-bar-chart-bar-gap: 10px;
    --esg-bar-chart-bar-width: 14px;
    --esg-bar-chart-tick-left: -60px;
    --esg-bar-chart-tick-width: 52px;
    --esg-bar-chart-label-space: 56px;
}

.esg21-page .esg21-bar-profit {
    background: #3f69b1;
}

.esg21-page .esg21-bar-stock {
    background: #4fb7bb;
}

@media (max-width: 900px) {
    .esg21-page .esg21-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* Gulei project: the inline 3-column grid stacks on phones instead of running off-screen */
@media (max-width: 768px) {
    .esg21-page .esg21-block-investment {
        width: 100%;
    }

    .esg21-page .esg21-block-investment > div[style*="grid-template-columns"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
    }
}

/* Management approach cards: shared .esg-mgmt in css/esg-table-soft.css */
.esg21-page .esg21-block-management {
    background: transparent;
}

/* Revenue/profit chart cards: rounded like the other cards */
.esg21-page .esg-chart-card {
    border-radius: 12px;
}

/* Gulei milestones as a timeline (docx): date | dot on a thin line | event */
.esg21-page .esg21-milestones {
    --ms-date: 8.6em;
    --ms-dot: #2fa7a5;
    margin: 0;
    padding: 0;
    list-style: none;
}

.esg21-page .esg21-milestones li {
    display: grid;
    grid-template-columns: var(--ms-date) 22px minmax(0, 1fr);
    column-gap: 8px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    line-height: 1.6;
    /* the vertical line runs through the dot column */
    background: linear-gradient(#cdeae8, #cdeae8) no-repeat calc(var(--ms-date) + 8px + 10px) 0 / 2px 100%;
}

.esg21-page .esg21-milestones li:first-child {
    background-position-y: 1.1em;
}

.esg21-page .esg21-milestones li:last-child {
    background-size: 2px 1.1em;
}

.esg21-page .esg21-milestones li::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 12px;
    height: 12px;
    margin-top: calc(0.8em - 6px);
    border-radius: 50%;
    background: var(--ms-dot);
    box-shadow: 0 0 0 3px var(--esg-color-white);
}

.esg21-page .esg21-ms-date {
    grid-column: 1;
    grid-row: 1;
    color: #555;
    white-space: nowrap;
}

.esg21-page .esg21-ms-text {
    grid-column: 3;
    grid-row: 1;
    color: #333;
}
