/* ==========================================================================
   /preparation/index.html 雅思準備指南
   載入順序：site.css → article.css → 本檔
   命名空間：.pg-*
   ========================================================================== */

/* ---------- 01、02、07｜一般表格（沿用 .ip-table-wrap） ---------- */
.ielts-article .pg-table table {
    min-width: 520px;
}

.ielts-article .pg-table tbody th {
    width: 38%;
    color: #222;
}

/* ---------- 03｜三階段計畫 ---------- */
.ielts-article .pg-phases {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 30px 0 34px;
    padding: 0;
    list-style: none;
    border-top: 2px solid #222;
}

.ielts-article .pg-phase {
    position: relative;
    min-width: 0;
    padding: 26px 22px 24px;
    border-bottom: 1px solid var(--ip-border);
}

.ielts-article .pg-phase+.pg-phase {
    border-left: 1px solid var(--ip-border);
}

.ielts-article .pg-phase:nth-child(2) {
    background: var(--ip-cream);
}

/* 頂端進度條：三階段逐步加深 */
.ielts-article .pg-phase::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    height: 4px;
    background: var(--red);
}

.ielts-article .pg-phase:nth-child(1)::before {
    width: 33%;
}

.ielts-article .pg-phase:nth-child(2)::before {
    width: 66%;
}

.ielts-article .pg-phase:nth-child(3)::before {
    width: 100%;
}

.ielts-article .ip-content .pg-phase-label {
    margin: 0 0 6px;
}

.ielts-article .pg-phase-weeks {
    font: italic 15px/1.4 Georgia, serif;
    color: var(--red);
}

.ielts-article .pg-phase h3 {
    margin: 0 0 16px;
    font-size: clamp(19px, 1.7vw, 22px);
    line-height: 1.5;
    color: #222;
}

.ielts-article .pg-phase dl {
    margin: 0;
}

.ielts-article .pg-phase dt {
    font-weight: 700;
    letter-spacing: .08em;
    color: #8a8a8a;
}

.ielts-article .pg-phase dd {
    margin: 2px 0 14px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.ielts-article .pg-phase dd:last-child {
    margin-bottom: 0;
    padding-left: 12px;
    border-left: 2px solid var(--red);
}

/* ---------- 03｜每週七小時安排 ---------- */
.ielts-article .ip-content .pg-week-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 -12px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8a8a8a;
}

.ielts-article .pg-week-head span+span::before {
    content: "／";
    margin-right: 10px;
    color: #c9c4be;
}

.ielts-article .pg-week {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 12px;
    margin: 24px 0 22px;
    padding: 0;
    list-style: none;
}

.ielts-article .pg-day {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 18px 20px;
    background: #fff;
    border: 1px solid var(--ip-border);
    border-top: 3px solid #222;
}

.ielts-article .pg-day:nth-child(3) {
    border-top-color: var(--red);
}

.ielts-article .ip-content .pg-day p {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
}

.ielts-article .ip-content .pg-day .pg-day-time {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--ip-border);
    font-size: 14px;
    color: #666;
}

.ielts-article .pg-day-time strong {
    display: block;
    font-size: 18px;
    color: #222;
}

/* ---------- 04｜四科 ---------- */
.ielts-article .pg-skills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.ielts-article .pg-skill {
    min-width: 0;
    padding: 26px 26px 24px;
    background: var(--ip-cream);
    border-top: 3px solid var(--red);
}

.ielts-article .ip-content .pg-skill-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.ielts-article .pg-skill-tag span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: #222;
    color: #fff;
    font: 700 17px/1 Georgia, serif;
    letter-spacing: 0;
}

.ielts-article .pg-skill:nth-child(1) .pg-skill-tag span,
.ielts-article .pg-skill:nth-child(4) .pg-skill-tag span {
    background: var(--red);
}

.ielts-article .pg-skill h3 {
    margin: 0 0 12px;
    font-size: clamp(18px, 1.6vw, 21px);
    line-height: 1.55;
    letter-spacing: 0;
    color: #222;
}

.ielts-article .ip-content .pg-skill p:not(.pg-skill-tag) {
    font-size: 15px;
    line-height: 1.9;
}

.ielts-article .ip-content .pg-skill p:last-child {
    margin-bottom: 0;
}

/* ---------- 05｜教材卡片（沿用 .ip-format-card） ---------- */
.ielts-article .pg-materials .ip-format-card dt.ip-sr+dd.ip-format-title {
    margin-top: 0;
}

/* ---------- 06｜模考紀錄 Checklist ---------- */
.ielts-article .pg-record {
    margin: 28px 0 24px;
    padding: 22px 28px 12px;
    background: #fff;
    border: 1px solid var(--ip-border);
    border-top: 4px solid var(--red);
    box-shadow: 6px 6px 0 var(--ip-cream);
}

.ielts-article .pg-record-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #222;
}

.ielts-article .pg-record-title {
    font: italic 700 14px/1.4 Georgia, serif;
    letter-spacing: .1em;
    color: var(--red);
}

.ielts-article .pg-record-cols {
    display: flex;
    gap: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8a8a8a;
}

.ielts-article .pg-record-cols span+span::before {
    content: "／";
    margin-right: 10px;
    color: #c9c4be;
}

.ielts-article .pg-check-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ielts-article .pg-check-item {
    display: grid;
    grid-template-columns: 26px 140px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed #d8d1c9;
}

.ielts-article .pg-check-item:last-child {
    border-bottom: 0;
}

/* 勾選框 */
.ielts-article .pg-check-box {
    position: relative;
    width: 22px;
    height: 22px;
    border: 1.5px solid #222;
    background: #fff;
}

.ielts-article .pg-check-box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 1px;
    width: 7px;
    height: 13px;
    border-right: 2.5px solid var(--red);
    border-bottom: 2.5px solid var(--red);
    transform: rotate(45deg);
}

.ielts-article .pg-check-label {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

/* 範例：如填寫在表格線上 */
.ielts-article .pg-check-value {
    padding: 2px 0 4px 2px;
    border-bottom: 1px solid #222;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.ielts-article .pg-check-item:nth-child(4) .pg-check-value {
    color: var(--red);
    font-weight: 700;
    border-bottom-color: var(--red);
}

/* ---------- RWD ---------- */
@media (max-width: 1100px) {
    .ielts-article .pg-week {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .ielts-article .pg-phases {
        grid-template-columns: minmax(0, 1fr);
    }

    .ielts-article .pg-phase+.pg-phase {
        border-left: 0;
    }

    .ielts-article .pg-phase::before {
        top: 0;
    }

    .ielts-article .pg-phase:first-child::before {
        top: -2px;
    }

    .ielts-article .pg-skills {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {

    .ielts-article .pg-phase {
        padding: 22px 0 20px;
    }

    .ielts-article .pg-phase:nth-child(2) {
        padding-inline: 16px;
        margin-inline: -16px;
    }

    .ielts-article .pg-week {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .ielts-article .pg-day {
        padding: 16px;
    }

    .ielts-article .pg-skill {
        padding: 22px 20px;
    }

    .ielts-article .pg-record {
        padding: 18px 16px 6px;
        box-shadow: none;
    }

    .ielts-article .pg-record-head {
        flex-direction: column;
        gap: 2px;
    }

    .ielts-article .pg-check-item {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 6px 12px;
        padding: 14px 0;
    }

    .ielts-article .pg-check-value {
        grid-column: 2;
    }
}
