.esg51-page .esg51-diligence-head {
    height: auto;
}

.esg51-page .esg51-section-heading {
    color: var(--esg-color-heading);
    font-size: 28px;
    line-height: 1.3;
    margin: 0;
}

.esg51-page .esg51-subheading {
    font-size: 24px;
    line-height: 1.4;
    margin: 0;
}

.esg51-page .esg51-process-strip {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.esg51-page .esg51-process-card {
    align-items: center;
    clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%, 8% 50%);
    color: var(--esg-color-white);
    display: flex;
    justify-content: center;
    gap: 8px;
    min-height: 80px;
    padding: 10px 34px 10px 26px; /* left notch ≈8%, right point ≈14% of the card */
    text-align: center;
}

.esg51-page .esg51-process-card .esg51-step-icon {
    width: 30px;
    height: 30px;
}

/* Line icons (SVG <symbol> sprite in ESG51.aspx); colour follows the parent's text colour */
.esg51-page .esg51-step-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.esg51-page .esg51-process-card span {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.esg51-page .esg51-process-card.role-statement {
    background: var(--esg-process-blue);
}

.esg51-page .esg51-process-card.role-identification {
    background: var(--esg-process-orange);
}

.esg51-page .esg51-process-card.role-analysis {
    background: var(--esg-process-teal);
}

.esg51-page .esg51-process-card.role-action {
    background: var(--esg-process-lime);
}

.esg51-page .esg51-process-card.role-reporting {
    background: var(--esg-process-purple);
}

.esg51-page .esg51-action-table {
    table-layout: fixed;
}

.esg51-page .esg51-action-table th,
.esg51-page .esg51-action-table td {
    border-color: var(--esg-process-blue-strong);
    line-height: 1.75;
    overflow-wrap: anywhere;
    text-indent: 0;
    vertical-align: top;
}

.esg51-page .esg51-action-table th {
    background: var(--esg-process-blue-strong);
    color: var(--esg-color-white);
    font-size: 18px;
    font-weight: 700;
    padding: 15px 12px;
    text-align: center;
}

.esg51-page .esg51-action-table td {
    background: var(--esg-color-white);
    color: var(--esg-color-heading-strong);
    font-size: 17px;
    padding: 14px 14px;
}

.esg51-page .esg51-action-table th:nth-child(1),
.esg51-page .esg51-action-table td:nth-child(1) {
    width: 11%;
}

.esg51-page .esg51-action-table th:nth-child(2),
.esg51-page .esg51-action-table td:nth-child(2) {
    width: 30%;
}

.esg51-page .esg51-action-table th:nth-child(3),
.esg51-page .esg51-action-table td:nth-child(3) {
    width: 26%;
}

.esg51-page .esg51-action-table th:nth-child(4),
.esg51-page .esg51-action-table td:nth-child(4) {
    width: 15%;
}

.esg51-page .esg51-action-table th:nth-child(5),
.esg51-page .esg51-action-table td:nth-child(5) {
    width: 18%;
}

.esg51-page .esg51-action-table .topic {
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.esg51-page .esg51-action-table ol {
    margin: 0;
    padding-left: 1.25em;
}

.esg51-page .esg51-action-table li {
    margin-bottom: 4px;
}

.esg51-page .esg51-lecture-table th,
.esg51-page .esg51-lecture-table td,
.esg51-page .esg51-survey-table th,
.esg51-page .esg51-survey-table td,
.esg51-page .esg51-training-table th,
.esg51-page .esg51-training-table td {
    border-color: var(--esg-process-purple-border);
    line-height: 1.7;
    text-indent: 0;
    vertical-align: middle;
}

.esg51-page .esg51-diligence-flow {
    --esg51-diligence-phase-col: 15fr;
    --esg51-diligence-step-col: 20fr;
    --esg51-diligence-body-col: 65fr;
    border: 1px solid var(--esg-process-purple);
}

.esg51-page .esg51-diligence-head {
    background: var(--esg-process-purple);
    color: var(--esg-color-white);
    display: grid;
    grid-template-columns: var(--esg51-diligence-phase-col) var(--esg51-diligence-step-col) var(--esg51-diligence-body-col);
}

.esg51-page .esg51-diligence-head > div {
    align-items: center;
    display: flex;
    font-size: 20px;
    font-weight: 700;
    height: 50px;
    justify-content: center;
    line-height: 1.2;
    padding: 6px 14px;
    text-align: center;
}

.esg51-page .esg51-diligence-stage {
    display: grid;
    grid-template-columns: var(--esg51-diligence-phase-col) var(--esg51-diligence-step-col) var(--esg51-diligence-body-col);
}

.esg51-page .esg51-diligence-phase {
    align-items: center;
    color: var(--esg-color-white);
    display: flex;
    font-size: 22px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.35;
    /* padding: 28px 18px; */
    position: relative;
    text-align: center;
}

.esg51-page .esg51-diligence-phase.phase-commitment {
    background: var(--esg-process-lime);
}

.esg51-page .esg51-diligence-phase.phase-management {
    background: var(--esg-process-teal);
}

.esg51-page .esg51-diligence-phase.phase-response {
    background: var(--esg-process-orange);
}

.esg51-page .esg51-diligence-stage.stage-2 .esg51-diligence-phase::before,
.esg51-page .esg51-diligence-stage.stage-3 .esg51-diligence-phase::before {
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    content: "";
    height: 34px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.esg51-page .esg51-diligence-stage.stage-2 .esg51-diligence-phase::before {
    background: var(--esg-process-lime);
}

.esg51-page .esg51-diligence-stage.stage-3 .esg51-diligence-phase::before {
    background: var(--esg-process-teal);
}

.esg51-page .esg51-diligence-rows {
    display: grid;
    grid-column: 2 / 4;
}

.esg51-page .esg51-diligence-stage + .esg51-diligence-stage .esg51-diligence-rows {
    border-top: 1px solid var(--esg-process-purple);
}

.esg51-page .esg51-diligence-row {
    display: grid;
    grid-template-columns: var(--esg51-diligence-step-col) var(--esg51-diligence-body-col);
}

.esg51-page .esg51-diligence-row + .esg51-diligence-row {
    border-top: 1px solid var(--esg-process-purple);
}

.esg51-page .esg51-diligence-step,
.esg51-page .esg51-diligence-body {
    padding: 18px 18px;
}

.esg51-page .esg51-diligence-step {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 20px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.4;
    text-align: center;
}

/* Step colours match the process strip above (Declare blue → Report purple) */
.esg51-page .esg51-diligence-step.step-statement {
    color: var(--esg-process-blue);
}

.esg51-page .esg51-diligence-step.step-identification {
    color: var(--esg-process-orange);
}

.esg51-page .esg51-diligence-step.step-analysis {
    color: var(--esg-process-teal);
}

.esg51-page .esg51-diligence-step.step-action {
    color: var(--esg-process-lime-text);
}

.esg51-page .esg51-diligence-step.step-reporting {
    color: var(--esg-process-purple);
}

/* Light tint per phase, following the phase colour (as in the Chap.5 docx) */
.esg51-page .esg51-diligence-stage.stage-1 .esg51-diligence-rows {
    background: var(--esg-process-lime-soft);
}

.esg51-page .esg51-diligence-stage.stage-2 .esg51-diligence-rows {
    background: var(--esg-process-teal-soft);
}

.esg51-page .esg51-diligence-stage.stage-3 .esg51-diligence-rows {
    background: var(--esg-process-orange-soft);
}

.esg51-page .esg51-diligence-body {
    align-items: center;
    color: var(--esg-color-text-strong);
    display: flex;
    font-size: 18px;
    line-height: 1.7;
    text-indent: 0;
}

.esg51-page .esg51-lecture-table,
.esg51-page .esg51-survey-table,
.esg51-page .esg51-training-table {
    table-layout: fixed;
}

.esg51-page .esg51-lecture-table th,
.esg51-page .esg51-survey-table th,
.esg51-page .esg51-training-table th {
    background: var(--esg-process-blue-strong);
    color: var(--esg-color-white);
    font-size: 18px;
    font-weight: 700;
    padding: 16px 12px;
    text-align: center;
}

.esg51-page .esg51-lecture-table td,
.esg51-page .esg51-survey-table td,
.esg51-page .esg51-training-table td {
    background: var(--esg-color-white);
    color: var(--esg-color-heading-strong);
    font-size: 17px;
    padding: 14px 14px;
}

.esg51-page .esg51-training-table .topic {
    font-weight: 700;
    text-align: center;
}

.esg51-page .esg51-bullet-list,
.esg51-page .esg51-training-list {
    margin: 0;
    padding-left: 1.3em;
}

.esg51-page .esg51-survey-table {
    min-width: 720px;
}

.esg51-page .esg51-survey-table th,
.esg51-page .esg51-survey-table td {
    border-color: var(--esg-process-blue-strong);
}

.esg51-page .esg51-survey-table td {
    vertical-align: top;
}

.esg51-page .esg51-survey-table .item-cell {
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.esg51-page .esg51-bullet-list li,
.esg51-page .esg51-training-list li,
.esg51-page .esg51-improvement-list li {
    margin-bottom: 8px;
}

.esg51-page .esg51-satisfaction-block p {
    margin: 0 0 12px;
    text-indent: 0;
}

.esg51-page .esg51-improvement-list {
    margin: 0 0 12px;
    padding-left: 1.3em;
}

.esg51-page .esg51-photo {
    text-align: center;
}

.esg51-page .esg51-photo p {
    font-weight: 400;
    margin: 0;
    text-align: center;
    text-indent: 0;
}

.esg51-page .esg51-training-table {
    min-width: 760px;
}

.esg51-page .esg51-training-table .number,
.esg51-page .esg51-lecture-table .number {
    text-align: center;
}

.esg51-page .esg51-training-table .total td {
    background: var(--esg-process-blue-soft);
    color: var(--esg-process-blue-strong);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 1199px) {
    .esg51-page .esg51-process-card span {
        font-size: 30px;
    }
}

@media (max-width: 991px) {
    .esg51-page .esg51-section-heading {
        font-size: 25px;
    }

    .esg51-page .esg51-subheading {
        font-size: 22px;
    }

    .esg51-page .esg51-process-strip {
        grid-template-columns: 1fr;
    }

    .esg51-page .esg51-process-card {
        clip-path: polygon(0 0, 50% 8%, 100% 0, 100% 86%, 50% 100%, 0 86%);
        min-height: 108px;
        padding: 18px 26px 28px;
    }

    .esg51-page .esg51-process-card span {
        font-size: 28px;
    }

    .esg51-page .esg51-diligence-head > div {
        font-size: 18px;
    }

    .esg51-page .esg51-diligence-phase {
        font-size: 20px;
    }

    .esg51-page .esg51-diligence-step {
        font-size: 18px;
    }

    .esg51-page .esg51-diligence-body {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .esg51-page .esg51-section-heading {
        font-size: 22px;
    }

    .esg51-page .esg51-subheading {
        font-size: 20px;
    }

    .esg51-page .esg51-action-table th,
    .esg51-page .esg51-lecture-table th,
    .esg51-page .esg51-survey-table th,
    .esg51-page .esg51-training-table th {
        font-size: 16px;
        padding: 14px 10px;
    }

    .esg51-page .esg51-action-table td,
    .esg51-page .esg51-lecture-table td,
    .esg51-page .esg51-survey-table td,
    .esg51-page .esg51-training-table td {
        font-size: 15px;
        padding: 12px 10px;
    }

    .esg51-page .esg51-diligence-head {
        display: none;
    }

    .esg51-page .esg51-diligence-stage,
    .esg51-page .esg51-diligence-row {
        grid-template-columns: 1fr;
    }

    .esg51-page .esg51-diligence-rows {
        grid-column: auto;
    }

    .esg51-page .esg51-diligence-phase {
        font-size: 18px;
        min-height: 96px;
        padding: 18px 14px;
    }

    .esg51-page .esg51-diligence-stage.stage-2 .esg51-diligence-phase::before,
    .esg51-page .esg51-diligence-stage.stage-3 .esg51-diligence-phase::before {
        content: none;
    }

    .esg51-page .esg51-diligence-step {
        flex-direction: row;
        gap: 10px;
        font-size: 18px;
        justify-content: flex-start;
        padding: 16px 14px 8px;
        text-align: left;
    }

    .esg51-page .esg51-diligence-body {
        border-left: none;
        font-size: 15px;
        padding: 0 14px 16px;
    }

}

/* Results table: below 992px each row becomes a card; labels come from td[data-label] */
@media (max-width: 991px) {
    .esg51-page .esg51-action-table,
    .esg51-page .esg51-action-table tbody,
    .esg51-page .esg51-action-table tr,
    .esg51-page .esg51-action-table td {
        display: block;
        width: auto !important;
    }

    .esg51-page .esg51-action-table thead {
        display: none;
    }

    .esg51-page .esg51-action-table tr {
        border: 1px solid var(--esg-process-blue-strong);
        border-radius: 12px;
        margin-bottom: 16px;
        overflow: hidden;
    }

    .esg51-page .esg51-action-table td {
        border: none;
        border-top: 1px solid var(--esg-process-blue-soft);
        text-align: left !important;
    }

    .esg51-page .esg51-action-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--esg-process-blue-strong);
        font-weight: 700;
        margin-bottom: 4px;
    }

    .esg51-page .esg51-action-table td.topic {
        background: var(--esg-process-blue-strong);
        border-top: none;
        color: var(--esg-color-white);
        font-size: 18px;
    }

    .esg51-page .esg51-action-table td.topic::before {
        content: none;
    }
}

/* Health section: text left, certificate photo right (docx layout) */
.esg51-page .esg51-health-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 30%);
    gap: 32px;
    align-items: start;
}

.esg51-page .esg51-health-photo {
    margin: 0;
}

.esg51-page .esg51-bullet-list[start] {
    margin-top: 16px;
}

.esg51-page .esg51-health-photo img {
    display: block;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    .esg51-page .esg51-health-intro {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .esg51-page .esg51-health-photo {
        justify-self: center;
        max-width: 320px;
    }
}

.esg-policy-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--esg-color-text);
}

/* 卡片主體與佈局：左側圓形圖示 + 右側文字 */
.esg-policy-card {
    display: flex;
    align-items: flex-start;
    border-radius: 20px;
    padding: 32px 40px;
    gap: 32px;
    box-sizing: border-box;
}

.esg-policy-row {
    display: flex;
    gap: 20px;
}

.esg-policy-card.half-card {
    flex: 1;
    padding: 28px 30px;
    gap: 24px;
}

/* 左側圖示：白底圓形，線條顏色跟隨標題色（title-* class） */
.esg51-policy-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--esg-color-white);
}

.esg51-policy-icon svg {
    width: 52px;
    height: 52px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.half-card .esg51-policy-icon {
    width: 72px;
    height: 72px;
}

.half-card .esg51-policy-icon svg {
    width: 40px;
    height: 40px;
}

/* 右側文字內容區 */
.esg-policy-content {
    flex-grow: 1;
    min-width: 0;
}

    .esg-policy-content h4 {
        margin: 0 0 12px 0;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: normal;
        line-height: 1.35;
    }

.esg-policy-subtitle {
    margin: -4px 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--esg-color-text);
    line-height: 1.5;
}

.esg-policy-content p {
    margin: 0 0 12px 0;
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
    text-indent: 0;
}

/* Human Rights Risk Assessment Management Table: PDF download cards */
.esg51-page .esg51-download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.esg51-page .esg51-download-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid var(--esg-process-purple-border);
    border-radius: 16px;
    background: var(--esg-color-white);
    color: var(--esg-color-text-strong);
    text-decoration: none;
    transition: background-color .2s, box-shadow .2s, transform .2s;
}

.esg51-page .esg51-download-card:hover,
.esg51-page .esg51-download-card:focus-visible {
    background: var(--esg-process-purple-surface);
    box-shadow: 0 6px 16px rgba(114, 76, 155, .15);
    transform: translateY(-2px);
    text-decoration: none;
}

.esg51-page .esg51-download-card:focus-visible {
    outline: 2px solid var(--esg-process-purple);
    outline-offset: 2px;
}

.esg51-page .esg51-download-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    fill: none;
    stroke: var(--esg-process-purple);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.esg51-page .esg51-download-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.esg51-page .esg51-download-year {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--esg-process-purple);
}

.esg51-page .esg51-download-name {
    font-size: 15px;
    line-height: 1.5;
}

.esg51-page .esg51-download-meta {
    align-self: flex-start;
    margin-top: 6px;
    padding: 1px 10px;
    border: 1px solid var(--esg-process-purple-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--esg-process-purple);
}

@media (max-width: 991px) {
    .esg51-page .esg51-download-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .esg51-page .esg51-download-card {
        transition: none;
    }

    .esg51-page .esg51-download-card:hover,
    .esg51-page .esg51-download-card:focus-visible {
        transform: none;
    }
}

    .esg-policy-content p:last-child {
        margin-bottom: 0;
    }

/* 顏色設定：背景色 */
.bg-pink {
    background-color: #FDF2F4;
}

.bg-orange {
    background-color: #FEF5EC;
}

.bg-green {
    background-color: #F0F8F4;
}

.bg-blue {
    background-color: #F0F6F9;
}

/* 顏色設定：標題文字色 */
.title-pink {
    color: #D55E75;
}

.title-orange {
    color: #DF9B52;
}

.title-green {
    color: #539878;
}

.title-teal {
    color: #43A096;
}

.title-purple {
    color: #69639A;
}

/* RWD 響應式設定 */
@media (max-width: 900px) {
    .esg-policy-row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .esg-policy-card,
    .esg-policy-card.half-card {
        flex-direction: column;
        padding: 24px 20px;
        gap: 16px;
    }

    .esg51-policy-icon,
    .half-card .esg51-policy-icon {
        width: 64px;
        height: 64px;
    }

    .esg51-policy-icon svg,
    .half-card .esg51-policy-icon svg {
        width: 36px;
        height: 36px;
    }
}

/* Soft table look (Results + Good Lecture): rounded frame like the page's cards,
   row lines only, light zebra (all four ESG51 tables). */
.esg51-page .esg51-soft-wrap {
    border: 1px solid var(--esg-process-blue-soft);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(23, 58, 138, 0.06);
}

.esg51-page .esg51-soft-wrap .esg-table {
    border: none;
    border-collapse: collapse;
    margin: 0;
}

.esg51-page .esg51-soft-wrap .esg-table th,
.esg51-page .esg51-soft-wrap .esg-table td {
    border: none;
    border-bottom: 1px solid var(--esg-process-blue-soft);
}

.esg51-page .esg51-soft-wrap .esg-table tbody tr:last-child td {
    border-bottom: none;
}

.esg51-page .esg51-soft-wrap .esg-table th {
    vertical-align: middle;
}

.esg51-page .esg51-soft-wrap .esg-table th + th {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.esg51-page .esg51-soft-wrap .esg-table tbody tr:nth-child(even) td {
    background: #f5f8fc;
}

/* 100% implementation rate: green pill (same shape as ESG45 badges) */
.esg51-page .esg51-rate-pill {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--esg-palette-green-text);
    border-radius: 999px;
    background: var(--esg-palette-lime-soft);
    color: #5e7000;
    font-weight: 700;
    line-height: 1.4;
}

@media (min-width: 992px) {
    .esg51-page .esg51-action-table td + td {
        border-left: 1px solid var(--esg-process-blue-soft);
    }

    .esg51-page .esg51-action-table td.topic,
    .esg51-page .esg51-soft-wrap .esg51-action-table tbody tr:nth-child(even) td.topic {
        background: var(--esg-process-blue-soft);
        color: var(--esg-process-blue-strong);
    }

    .esg51-page .esg51-action-table td.rate {
        text-align: center;
        vertical-align: middle;
    }
}

/* Results table cards on tablet/phone: the cards carry their own frame */
@media (max-width: 991px) {
    .esg51-page .esg51-soft-wrap:has(.esg51-action-table) {
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .esg51-page .esg51-soft-wrap .esg51-action-table td {
        border-bottom: none;
        border-top: 1px solid var(--esg-process-blue-soft);
    }

    .esg51-page .esg51-soft-wrap .esg51-action-table tbody tr:nth-child(even) td:not(.topic) {
        background: var(--esg-color-white);
    }
}

/* Good Lecture: illustration left of the table (docx layout) */
.esg51-page .esg51-lecture-block {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.esg51-page .esg51-lecture-art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--esg-process-blue-soft);
    color: var(--esg-process-blue-strong);
}

.esg51-page .esg51-lecture-art svg {
    width: 84px;
    height: 84px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.esg51-page .esg51-lecture-table td:first-child {
    color: var(--esg-color-heading-strong);
    font-weight: 500;
}

.esg51-page .esg51-lecture-table td:nth-child(2) {
    color: var(--esg-color-muted);
}

.esg51-page .esg51-lecture-table td.number {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .esg51-page .esg51-lecture-block {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .esg51-page .esg51-lecture-art {
        justify-self: center;
        width: 96px;
        height: 96px;
    }

    .esg51-page .esg51-lecture-art svg {
        width: 58px;
        height: 58px;
    }
}

/* Good Lecture on phones: one card per course, labels from td[data-label] */
@media (max-width: 768px) {
    .esg51-page .esg51-lecture-table,
    .esg51-page .esg51-lecture-table tbody,
    .esg51-page .esg51-lecture-table tr {
        display: block;
        width: auto !important;
    }

    .esg51-page .esg51-lecture-table thead {
        display: none;
    }

    .esg51-page .esg51-lecture-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .esg51-page .esg51-soft-wrap .esg51-lecture-table td {
        display: block;
        border-bottom: none;
        text-align: left;
    }

    .esg51-page .esg51-lecture-table td:first-child,
    .esg51-page .esg51-lecture-table td:nth-child(2) {
        grid-column: 1 / -1;
    }

    .esg51-page .esg51-lecture-table td:first-child {
        padding-bottom: 0;
    }

    .esg51-page .esg51-lecture-table td:nth-child(2) {
        padding-top: 2px;
    }

    .esg51-page .esg51-lecture-table td.number::before {
        content: attr(data-label);
        display: block;
        color: var(--esg-process-blue-strong);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.4;
    }

    .esg51-page .esg51-lecture-table td.number {
        color: var(--esg-process-blue-strong);
        font-size: 18px;
        font-weight: 700;
    }

    .esg51-page .esg51-soft-wrap .esg51-lecture-table tbody tr + tr {
        border-top: 1px solid var(--esg-process-blue-soft);
    }
}

/* Survey + Training tables: label column tinted like the Results "Issue" column;
   no zebra (training has rowspan groups, so nth-child striping would misalign) */
.esg51-page .esg51-soft-wrap .esg51-survey-table tbody tr:nth-child(even) td,
.esg51-page .esg51-soft-wrap .esg51-training-table tbody tr:nth-child(even) td {
    background: var(--esg-color-white);
}

.esg51-page .esg51-soft-wrap .esg51-survey-table tbody tr td.item-cell,
.esg51-page .esg51-soft-wrap .esg51-training-table tbody tr td.topic {
    background: var(--esg-process-blue-soft);
    border-right: 1px solid var(--esg-process-blue-soft);
    color: var(--esg-process-blue-strong);
    font-weight: 700;
}

.esg51-page .esg51-soft-wrap .esg51-training-table td.topic {
    border-bottom-color: var(--esg-color-white);
    vertical-align: middle;
}

.esg51-page .esg51-training-table td.number {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.esg51-page .esg51-soft-wrap .esg51-training-table tbody tr.total td {
    background: var(--esg-process-blue-soft);
    border-top: 2px solid var(--esg-process-blue-strong);
    color: var(--esg-process-blue-strong);
    font-weight: 700;
}

@media (max-width: 768px) {
    .esg51-page .esg51-survey-table {
        min-width: 0;
    }
}
