/* MPPSC Prelims — Syllabus & Progress Tracker */

.page-mppsc-prelims-syllabus .page-hero {
    --page-hero-bg: linear-gradient(135deg, #1e3a2f 0%, #2d5a4a 40%, #1e4d3d 100%);
}

.mppsc-hero .page-hero-sub {
    max-width: 42rem;
}

.mppsc-back {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.mppsc-back:hover {
    color: #fff;
    text-decoration: underline;
}

.mppsc-main {
    padding: 2rem 0 3rem;
}

.mppsc-heavy-lifting {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading, #1a1a1a);
    margin: 2rem 0 0.75rem;
}

.mppsc-bottom-actions {
    margin-bottom: 2rem;
}

.mppsc-pdf-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #16a34a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.mppsc-pdf-btn:hover {
    background: #15803d;
}

.mppsc-ad {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

.mppsc-ad-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: var(--text-heading, #1a1a1a);
    text-align: center;
}

.mppsc-ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.mppsc-ad-card {
    display: block;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.mppsc-ad-card:hover {
    box-shadow: 0 8px 24px rgba(30, 77, 61, 0.12);
    transform: translateY(-2px);
    border-color: rgba(30, 77, 61, 0.25);
}

.mppsc-ad-icon {
    display: block;
    margin-bottom: 1rem;
}

.mppsc-ad-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-heading, #1a1a1a);
}

.mppsc-ad-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted, #555);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.mppsc-ad-card-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e4d3d;
}

.mppsc-ad-card:hover .mppsc-ad-card-link {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .mppsc-ad-grid {
        grid-template-columns: 1fr;
    }
}

.mppsc-block {
    margin-bottom: 2.5rem;
}

.mppsc-h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--text-heading, #1a1a1a);
}

.mppsc-h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    color: var(--text-heading, #1a1a1a);
}

.mppsc-overview {
    font-size: 0.95rem;
    color: var(--text-muted, #555);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.mppsc-tip {
    font-size: 0.9rem;
    color: var(--text-muted, #555);
    margin: 1rem 0 0;
    font-style: italic;
}

.mppsc-guide {
    background: rgba(30, 77, 61, 0.06);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #1e4d3d;
}

.mppsc-algorithm-list {
    margin: 0.75rem 0 1rem;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-body, #333);
}

.mppsc-algorithm-list li {
    margin-bottom: 0.6rem;
}

.mppsc-guide-note {
    font-size: 0.95rem;
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    background: rgba(22, 163, 74, 0.08);
    border-radius: 8px;
    border-left: 3px solid #16a34a;
    color: var(--text-body, #333);
}

.mppsc-tips-list {
    margin: 0 0 0.5rem;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.mppsc-pattern-list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-body, #333);
}

.mppsc-pattern-list li {
    margin-bottom: 0.35rem;
}

.mppsc-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    border-radius: 10px;
    background: var(--bg-white, #fff);
}

.mppsc-simple-table,
.mppsc-topic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mppsc-simple-table th,
.mppsc-simple-table td,
.mppsc-topic-table th,
.mppsc-topic-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
}

.mppsc-simple-table thead th,
.mppsc-topic-table thead th {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.04);
}

.mppsc-topic-table tbody tr {
    transition: background 0.2s;
}

.mppsc-topic-table tbody tr.mppsc-row-done {
    background: rgba(22, 163, 74, 0.12);
}

.mppsc-topic-table tbody tr.mppsc-row-done:hover {
    background: rgba(22, 163, 74, 0.18);
}

.mppsc-th-quest,
.mppsc-td-quest {
    width: 3.5rem;
    text-align: center;
    vertical-align: middle;
}

.mppsc-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
}

.mppsc-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mppsc-checkbox-ui {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color, #ccc);
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
}

.mppsc-checkbox:focus-visible + .mppsc-checkbox-ui {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

.mppsc-checkbox:checked + .mppsc-checkbox-ui {
    background: #16a34a;
    border-color: #16a34a;
}

.mppsc-checkbox:checked + .mppsc-checkbox-ui::after {
    content: "";
    position: absolute;
    left: 0.3rem;
    top: 0.08rem;
    width: 0.35rem;
    height: 0.6rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mppsc-pill {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mppsc-pill-high {
    background: #fef2f2;
    color: #b91c1c;
}

.mppsc-pill-mid {
    background: #fffbeb;
    color: #b45309;
}

.mppsc-pill-low {
    background: #f0fdf4;
    color: #15803d;
}

@media print {
    @page {
        margin: 2cm;
    }

    .no-print {
        display: none !important;
    }

    body.page-mppsc-prelims-syllabus {
        background: #fff;
        padding: 0;
    }

    body.page-mppsc-prelims-syllabus::after {
        content: "AaRaMbh";
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3.5rem;
        font-weight: 700;
        color: #0f3460;
        opacity: 0.05;
        transform: rotate(-28deg);
        pointer-events: none;
        z-index: 0;
        font-family: inherit;
    }

    .mppsc-main {
        padding: 0 0.5cm;
        position: relative;
        z-index: 1;
    }

    .mppsc-h2,
    .mppsc-h3 {
        page-break-after: avoid;
    }

    .mppsc-block {
        break-inside: auto;
        page-break-inside: auto;
    }

    .mppsc-table-wrap {
        break-inside: auto;
        page-break-inside: auto;
    }

    .mppsc-topic-table tbody tr.mppsc-row-done {
        background: #e8f5e9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 768px) {
    .mppsc-topic-table {
        font-size: 0.8rem;
    }

    .mppsc-topic-table th,
    .mppsc-topic-table td {
        padding: 0.5rem 0.4rem;
    }
}
