/* -----------------------------------------------------------------------
   Media-responsive project brief template, copyright © 2022 Darren Wilson
   ----------------------------------------------------------------------- */
/* PRINT CSS */

@media print {

    :root {
        display: static;
    }

    * {
        box-sizing: border-box;
    }

    @page {
        size: letter portrait;
        margin: 4em 4em 4em 4em;
        color: black;
    }

    html,
    body {
        font-size: 9pt;
        line-height: 1.4em;
        font-weight: 400;
        width: 100%;
        height: calc(100vh - 2.75em - 6rem);
        margin: 0;
        color: black;
    }

    h1,
    h2,
    h3,
    h4,
    h5 {
        font-weight: 700;
        break-after: avoid;
        hyphens: none;
    }


    h1 {
        font-size: 24pt;
    }

    h2 {
        font-size: 18pt;
        line-height: 1em;
        width: inherit;
        margin: 1em auto;
        letter-spacing: -0.02em;
        column-span: all;
    }

    h3 {
        font-size: 8.75pt;
        width: inherit;
        margin: 0 auto;
        text-transform: uppercase;
        font-weight: 400;
        letter-spacing: 0.1em;
    }

    h4 {
        font-size: 7pt;
        line-height: 1.2em;
    }

    ol {
        list-style: decimal;
    }

    ul {
        list-style: disc;
    }


    header {
        -webkit-column-count: 1;
        -moz-column-count: 1;
        column-count: 1;
    }

    header #courseInfo img.col {
        display: none;
    }

    header #courseInfo img.bk {
        display: block;
    }

    header #courseInfo {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: max-content auto 2rem auto;
        grid-column-gap: 0.5em;
        align-items: end;
        height: max-content;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    header #courseInfo img {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        height: 6em;
        align-self: end;
        justify-self: end;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        vertical-align: baseline;
    }

    header #courseInfo h3 {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        width: max-content;
        height: max-content;
        margin: 0 !important;
        padding-top: 0.3em !important;
        padding-bottom: 0 !important;
        line-height: 1em;
        white-space: nowrap;
    }

    header #courseInfo h4 {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        width: max-content;
        line-height: 1em;
        font-weight: 400;
        letter-spacing: 0.01em;
        margin: 0 !important;
        padding: 0 !important;
        align-self: end;
        width: 100%;
        white-space: nowrap;
    }

    header #courseInfo #spacer {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }

    header #courseInfo h1 {
        grid-column: 1 / 3;
        grid-row: 4 / 5;
    }

    header #programID {
        display: none;
    }

    header #courseID {}

    header #courseCode {
        display: inline-block;
    }

    header #courseCode::after {
        content: " ";
    }

    header #courseCode {
        display: inline-block;
    }

    #revisionDate::after {
        content: " SOMETHING";
    }

    #revisionDate {
        display: inline-block;
    }

    header .col {
        display: none;
    }

    header .bk {
        display: block;
    }

    header h3 {
        margin: 0 0 0.5rem 0;
    }

    header h1 {
        line-height: 1em;
        margin: 0 0 1rem 0;
    }

    header h2 {
        margin: 0 0 0.5rem 0;
    }

    header p:last-of-type {
        padding-bottom: 1.3em;
        /*        border-bottom: 1px black solid;*/
        margin-bottom: 1.3em;
    }

    header #courseDetails {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr 1fr;
        grid-gap: 1.5rem;
        border-bottom: 1px black solid;
        margin-bottom: 1.6rem;
    }

    section {
        -webkit-column-count: 2;
        -webkit-column-gap: 1.5rem;
        -moz-column-count: 2;
        -moz-column-gap: 2;
        column-count: 2;
        column-gap: 1.5rem;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        hyphens: auto;
        widows: 3;
        orphans: 2;
        margin-top: 1em;
        border-top: 1px black solid;
        padding-top: 1em;
        /*        padding-bottom: 2em;*/
        /*        margin-bottom: 2em;*/
        /*        break-after: page;*/
        /*        break-inside: avoid-page;*/
    }

    section:first-of-type {
        -webkit-column-count: 1;
        -moz-column-count: 1;
        column-count: 1;
    }

    section#overview {
        -webkit-column-count: 1;
        -moz-column-count: 1;
        column-count: 1 !important;
    }

    section:last-of-type {
        break-after: avoid;
    }

    .columnBreakBefore,
    .newCol {
        break-before: column;
    }

    .columnBreakAfter,
    .newColAfter {
        break-after: column;
    }

    .pageBreakBefore,
    .newPage {
        break-before: page;
    }

    .pageBreakAfter,
    .newPageAfter {
        break-after: page;
    }

    #overviewBlock {
        display: grid;
        grid-template-columns: 1fr 50px;
        grid-gap: 1.5rem;
    }

    #overviewBlock blockquote {
        grid-column: 1 / 2;
        width: auto;
        padding: 2rem;
        text-indent: -0.75rem;
        font-weight: bold;
    }

    #overviewBlock blockquote figcaption {
        font-weight: normal;
        margin-top: 0.5em;
        font-size: 0.625em;
        margin-left: 0.75rem;
    }

    #detailTable {
        grid-column: 1 / 2;
    }

    #detailTable table {
        width: 100%;
    }

    #detailText {
        -webkit-column-count: 2;
        -webkit-column-gap: 1.5rem;
        -moz-column-count: 2;
        -moz-column-gap: 1.5rem;
        column-count: 2;
        column-gap: 1.5rem;
        widows: 3;
        orphans: 2;
    }

    #qrcode {
        display: inline-block;
        width: 50px;
        margin: 0 0 2rem 0;
        float: right;
    }

    #qrcode img {
        height: 50px;
    }

    main h2 {
        break-after: avoid;
        widows: 2;
        orphans: 2;
        line-height: 1em;
        /*        break-before: column;*/
        /*        padding-right: 25%;*/
        margin-bottom: 1rem;
    }

    main h3 {
        break-after: avoid;
        widows: 2;
        orphans: 2;
        line-height: 1.4em;
        margin: 1em 0 0.5em 0;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    main h4 {
        font-size: 1em;
        margin-top: 1em;
        break-after: avoid;
    }

    main h5 {
        display: inline;
        font-style: italic;
    }

    main h5::after {
        content: ". ";
    }

    main h5 + p {
        display: inline;
    }

    main h2:first-child {
        margin-top: 0;
    }

    /*
    main p:first-of-type::first-line {
        letter-spacing: 0.1em;
        text-transform: uppercase;
        font-size: 0.875em;
        line-height: 1.3rem;
        padding-top: 0.5em;
        hyphens: none;
    }*/
    main ul,
    main ol {
        margin: 1em 0;
        padding-left: 1.5em;
        /*        break-inside: avoid;*/
        widows: 3;
        orphans: 2;
    }

    #overview blockquote,
    #overview p {
        font-size: 125%;
    }

    p {
        margin: 0;
        widows: 3;
        orphans: 2;
        line-height: 1.4em;
    }

    p + p {
        text-indent: 2em;
    }

    h2:has(+ p),
    h2:has(+ h3) {
        column-span: all;
        font-size: 125%;
        margin-bottom: 1.25em;
    }

    section > p:last-of-type {
        margin-bottom: 0;
    }

    /*
    section p:nth-of-type(2) {
        text-indent: 0;
    }*/

    ul:has(+ h3) {
        padding-top: 1em;
        /*        border-top: 0.5px black solid;*/
        margin-top: 0;
    }

    h3.newCol {
        break-before: column;
        margin-top: 0;
    }


    h3:has(+ p) {
        column-span: all;
        margin: 0 0 1em 0;
    }

    /*
    p:first-of-type + h3:first-of-type {
        margin-top: 0;
        padding-top: 1em;
        border: 2px red solid;
    }
*/

    h2 + table {
        margin-top: 0.5em;
    }

    p:has(+ h2),
    p:has(+ h3) {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    h2 + p:first-of-type + h3,
    p + h3 {
        margin-top: 1em;
        border-top: 1px black dotted;
        padding-top: 1em;
        column-span: all;
    }

    h2 + p:has(+ h3) {
        column-span: all;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    p:has(+ h2),
    p:has(+ h3) {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    h3 + h4 {
        margin-top: 0;
        column-span: all;
    }

    table {
        table-layout: fixed;
        margin: 0.5em 0 1em 0;
        border-collapse: separate;
        border-spacing: 0;
        border-top: 2px black solid;
        border-bottom: 2px black solid;
        width: 100%;
        column-span: all;
        /*        page-break-inside: avoid !important;*/
    }

    table th,
    table td {
        padding: 0.375em 0.5em;
        font-size: 80%;
        line-height: 1.3em;
        vertical-align: top;
        hyphens: auto;
    }

    table th {
        text-align: left;
    }

    table.numLast td:last-child {
        font-variant-numeric: tabular-nums;
        text-align: right;
    }

    table thead th {
        color: black;
        border-top: 1px black solid;
        border-bottom: 1px black solid;
        text-transform: uppercase;
        font-size: 0.6875em;
        letter-spacing: 0.1em;
        padding: 0.5rem 0.4rem;
    }

    table thead:first-of-type th {
        border-top: none;
    }

    table tbody th,
    table tbody td {
        border-bottom: 1px black dotted;
    }

    table tbody tr:last-child th,
    table tbody tr:last-child td {
        border-bottom: none !important;
    }

    table.numLast tbody tr:last-child th,
    table.numLast tbody tr:last-child td {
        border-top: 1px black solid;
    }

    table.hasTotal tbody tr:nth-last-child(2) th,
    table.hasTotal tbody tr:nth-last-child(2) td {
        border-bottom: none;
    }

    .tnum,
    .rAlign {
        text-align: right;
    }

    caption {
        font-size: 0.6875rem;
        text-align: left;
        caption-side: bottom;
    }

    .fiveW {
        width: 5%;
    }

    .tenW {
        width: 10%;
    }

    .fifteenW {
        width: 15%;
    }

    .twentyW {
        width: 20%;
    }

    .twentyFiveW {
        width: 25%;
    }

    .thirtyW {
        width: 30%;
    }

    .fortyW {
        width: 40%;
    }

    .fiftyW {
        width: 50%;
    }

    .sixtyW {
        width: 60%;
    }

    .seventyW {
        width: 70%;
    }

    table.rubric {}

    table.rubric thead th {
        background-color: #CCC;
        color: black;
        font-size: 0.625em;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 0.05em;
        vertical-align: bottom;
    }

    table.rubric tbody td::first-line {
        font-weight: 700;
    }

    table.rubric thead th,
    table.rubric tbody th {
        background-color: white !important;
    }

    table.sched {
        -webkit-column-count: 1;
        -moz-column-count: 1;
        column-count: 1;
    }

    table.sched tbody th,
    table.sched tbody td {
        font-weight: 400;
    }

    table.sched tbody th::first-line {
        font-weight: 700;
    }

    table.sched ul,
    table.sched ol {
        margin: 0;
    }

    footer {
        position: relative;
        bottom: 0;
        margin: 2em auto 0 auto;
        padding: 0 0 1em 0;
        font-size: 5.5pt;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    #separator {
        width: 4rem;
        height: 0;
        border-top: 0.5rem black solid;
        margin: 1rem 0 0.5rem 0;
    }

    h3#courseID a,
    h3#courseID a:link,
    h3#courseID a:hover,
    h3#courseID a:visited {
        text-decoration: none;
        color: #000000;
        border: none;
    }

    aside {
        display: none;
    }

    nav {
        display: none;
    }

    footer {
        display: absolute;
        bottom: 0;
    }

    a:link,
    a:visited {
        color: black;
        text-decoration: none;
        border-bottom: 1px black dotted;
    }

    a::after {
        content: url(../img/icons/open_in_new_12px.svg);
        width: 8px;
        height: 8px;
        padding: 0 0 0 4px;
        margin: 0 2px 0 0;
        /*        border-bottom: 1px white solid;*/
    }

    table th.term {
        width: 10%;
    }

    table th.courseID {
        width: 15%;
    }

    table th.courseName {
        width: 35%;
    }

    table th.enrolment {
        width: 15%;
    }

    table th.role {
        width: 25%;
    }

    table + p {
        column-span: all;
    }

}
