/* ============================================================================
   components/furniture.css  --  what surrounds a page's content

     .course-materials   the bar at the top of a lecture: date, slides, assignment, reference
     .course-meta        the line at the top of a reference page: review badge, part of, used in
     .course-index       lists of lectures / slides / assignments / reference books
                         ({{< course-index ... >}})
     .notation-table     the generated Notation page
     .glossary, .term    the generated Glossary page and {{< term >}} links
   ==========================================================================*/

/* ------------------------------------------------- lecture materials bar */

.course-materials,
.course-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    margin: 0 0 1.4rem;
    font-size: 0.9rem;
}

.course-materials {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--course-rule);
    border-radius: var(--course-radius);
    background: var(--course-wash);
}

.course-materials .cm-date {
    font-weight: 600;
    margin-right: 0.4rem;
    padding-right: 0.8rem;
    border-right: 1px solid var(--course-rule);
}

.course-materials .cm-link {
    padding: 0.1rem 0.6rem;
    border: 1px solid color-mix(in srgb, var(--course-ink) 25%, transparent);
    border-radius: 999px;
    text-decoration: none;
}

.course-materials .cm-link:hover {
    background: color-mix(in srgb, var(--course-ink) 8%, transparent);
}

/* ------------------------------------------------- reference page header */

.course-meta {
    color: var(--course-muted);
}

.course-meta .review-badge {
    margin-bottom: 0;
}

.course-meta .cm-item+.cm-item::before,
.course-meta .review-badge+.cm-item::before {
    content: "\00b7";
    margin-right: 0.6rem;
}

/* ------------------------------------------------------------- indexes */

ul.course-index {
    list-style: none;
    margin: 0.5rem 0 1.5rem;
    padding: 0;
}

ul.course-index>li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--course-rule);
}

ul.course-index>li:last-child {
    border-bottom: 0;
}

.course-index .ci-title {
    font-weight: 600;
    text-decoration: none;
}

.course-index .ci-title:hover {
    text-decoration: underline;
}

.course-index .ci-key {
    display: inline-block;
    min-width: 2.6rem;
    margin-right: 0.3rem;
    font-variant-numeric: tabular-nums;
    color: var(--course-muted);
    font-weight: 500;
}

.course-index .ci-date {
    color: var(--course-muted);
    font-size: 0.9rem;
}

.course-index .ci-links {
    margin-left: auto;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.9rem;
    color: var(--course-muted);
}

/* reference books are cards, not rows */
ul.ref-index>li.ref-card {
    display: block;
    padding: 0.9rem 0;
}

.ref-card .ci-sub {
    display: block;
    color: var(--course-muted);
    margin-top: 0.1rem;
}

.ref-card .ci-desc {
    display: block;
    margin-top: 0.3rem;
}

.ref-card .review-badge {
    margin: 0 0 0 0.75rem;
    vertical-align: middle;
}

.ref-card .ci-links {
    margin: 0.4rem 0 0;
}

ol.ci-chapters {
    margin: 0.5rem 0 0;
    padding-left: 1.4rem;
    columns: 2 18rem;
    font-size: 0.95rem;
}

/* ---------------------------------------- notation and glossary pages */

.notation-table table {
    width: 100%;
    font-size: 0.95rem;
}

.notation-table td:first-child {
    text-align: center;
    white-space: nowrap;
}

.notation-table td:nth-child(2) code {
    white-space: nowrap;
}

.notation-table td:last-child {
    font-size: 0.88rem;
}

.glossary dt.glossary-term,
.glossary .glossary-term {
    font-weight: 600;
    margin-top: 0.9rem;
}

.glossary dd {
    margin-left: 0;
}

/* {{< term >}}: dotted, so it reads as a definition on hover rather than a page link */
a.term {
    text-decoration: underline dotted;
    text-underline-offset: 0.2em;
    cursor: help;
}