/*======================================================================
    Matt Henes Mathematics Website
    syllabus.css — Syllabus and course-schedule pages
    October 2026

    Loaded after css/styles.css by the syllabus and schedule pages only
    (010/010hsyllabus.html, 010/010hschedule.html, and the matching pages
    in 005b/inperson, 005b/hybrid, 055/inperson, 055/online).
    Everything is scoped to .syllabus so no other page is affected.

    Canvas strips stylesheets on paste; the HTML inside
    <article id="syllabus"> is fully readable without this file.
======================================================================*/

.syllabus p,
.syllabus li,
.syllabus dd,
.syllabus td {
    color: var(--text);
}

.syllabus h2 {
    margin: 2.6rem 0 .8rem;
    padding-bottom: .35rem;
    font-size: 1.55rem;
    border-bottom: 2px solid var(--border);
    scroll-margin-top: 84px;
}

.syllabus h3 {
    margin: 1.6rem 0 .45rem;
    font-size: 1.18rem;
}

.syllabus h4 {
    margin: 1.1rem 0 .35rem;
    color: var(--heading);
    font-size: 1rem;
}

.syllabus ul,
.syllabus ol {
    margin-top: 0;
    padding-left: 1.5rem;
}

.syllabus li {
    margin-bottom: .3rem;
}

.syllabus .card {
    padding: 1.25rem 1.4rem;
}

/* Banner: target for "Back to top" links (clears the sticky header) */
.syllabus .course-banner {
    scroll-margin-top: 84px;
}

.course-meta {
    margin: .3rem 0 0;
    color: var(--text);
    font-weight: 600;
}


/*======================================================================
    QUICK FACTS AND COURSE LINKS
======================================================================*/

.quick-facts {
    margin: 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .45rem 1.2rem;
}

.quick-facts dt {
    color: var(--heading);
    font-weight: 700;
}

.quick-facts dd {
    margin: 0;
}

.quick-links {
    margin: 1rem 0 0;
    padding: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    list-style: none;
    border-top: 1px solid var(--border);
}

.syllabus .quick-links {
    padding-left: 0;
}

.syllabus .quick-links.no-rule {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.quick-links li {
    margin: 0;
}

.quick-links a {
    display: inline-block;
    padding: .4rem .85rem;
    background: #F2F5F8;
    border: 1px solid var(--primary-blue);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
}

.quick-links a:hover,
.quick-links a:focus-visible {
    background: #D6E2F0;
}


/*======================================================================
    ON THIS PAGE AND BACK TO TOP
======================================================================*/

.page-toc {
    margin-top: 1.4rem;
}

.syllabus .page-toc h2 {
    margin: 0 0 .5rem;
    padding: 0;
    border: 0;
    font-size: 1rem;
}

.page-toc ol {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.3rem;
    list-style: none;
}

.page-toc li {
    margin: 0;
}

.page-toc a {
    font-weight: 600;
}

.back-to-top {
    margin: 1.2rem 0 0;
    text-align: right;
}

.syllabus .back-to-top a {
    display: inline-block;
    padding: .2rem .1rem;
    font-size: .9rem;
    font-weight: 600;
}

.back-to-top a:hover,
.back-to-top a:focus-visible {
    text-decoration: underline;
}


/*======================================================================
    TABLES
======================================================================*/

.table-wrap {
    overflow-x: auto;
    margin: .4rem 0 1rem;
}

.syllabus table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: .97rem;
}

.syllabus caption {
    padding: 0 0 .4rem;
    color: var(--heading);
    font-weight: 700;
    text-align: left;
}

.syllabus th,
.syllabus td {
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.syllabus thead th {
    background: #EEF2F7;
    color: var(--heading);
}

.syllabus tbody th {
    color: var(--heading);
    white-space: nowrap;
}

.syllabus td.num,
.syllabus th.num {
    text-align: right;
    white-space: nowrap;
}

.syllabus tr.exam-row > * {
    background: #F7FAFF;
    font-weight: 600;
}

.grade-scale {
    max-width: 420px;
}

/* Weekly schedule */
.schedule-table td ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.schedule-table td li {
    margin: 0 0 .15rem;
}

.schedule-table .week-dates {
    display: block;
    color: var(--text-light);
    font-weight: 400;
    white-space: normal;
}

.schedule-table .event {
    font-weight: 700;
    color: var(--heading);
}

.schedule-table .event.holiday {
    font-weight: 600;
    color: var(--text-light);
}

.schedule-table tr.has-exam > * {
    background: #F7FAFF;
}

.schedule-table tr.final-row > * {
    background: #EEF2F7;
    font-weight: 700;
}


/*======================================================================
    CALLOUTS, OBJECTIVES, COLLAPSIBLE REFERENCE SECTIONS
======================================================================*/

.note {
    margin: 1rem 0;
    padding: .8rem 1rem;
    background: #F7FAFF;
    border-left: 4px solid var(--primary-blue);
    border-radius: 0 8px 8px 0;
}

.note p {
    margin: 0;
}

.note p + p {
    margin-top: .5rem;
}

.coded-list {
    padding-left: 0 !important;
    list-style: none;
}

.coded-list li {
    display: grid;
    grid-template-columns: 2.6rem 1fr;
    gap: .4rem;
}

.coded-list li ul {
    margin: .2rem 0 0;
    padding-left: 1.2rem;
    list-style: disc;
}

.coded-list li li {
    display: list-item;
    margin-bottom: .1rem;
}

.syllabus .coded-outline {
    padding-left: 0;
    list-style: none;
}

.code {
    color: var(--heading);
    font-weight: 700;
}

.syllabus details.chapter {
    margin-top: 1rem;
}

.syllabus details.chapter > div {
    padding: .4rem 1.2rem 1rem;
}

.outline > li {
    margin-top: .9rem;
    font-weight: 700;
    color: var(--heading);
}

.outline > li > ol,
.outline > li > ul {
    margin-top: .3rem;
    font-weight: 400;
    color: var(--text);
}


/*======================================================================
    RESPONSIVE
======================================================================*/

@media (max-width: 760px) {
    .syllabus h2 {
        font-size: 1.3rem;
    }

    .quick-facts {
        grid-template-columns: 1fr;
        gap: .1rem;
    }

    .quick-facts dd {
        margin-bottom: .55rem;
    }

    .syllabus th,
    .syllabus td {
        padding: .45rem .5rem;
    }

    .syllabus table {
        font-size: .92rem;
    }
}


/*======================================================================
    PRINT / SAVE AS PDF
======================================================================*/

@media print {
    .site-header,
    .site-footer,
    .page-toc,
    .quick-links,
    .back-to-top,
    .course-banner-icon {
        display: none !important;
    }

    body {
        background: white;
        font-size: 11pt;
    }

    .page-shell {
        padding: 0;
    }

    .card,
    .chapter {
        box-shadow: none !important;
    }

    .syllabus h2 {
        margin-top: 1.4rem;
        break-after: avoid;
    }

    .syllabus h3,
    .syllabus h4 {
        break-after: avoid;
    }

    .syllabus tr {
        break-inside: avoid;
    }

    .chapter > summary::before {
        display: none;
    }

    .syllabus a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: .85em;
        color: var(--text-light);
    }
}
