/* =========================================================
   Shared PRAISe teaching-course layout
   ========================================================= */

.course-page {
    overflow: hidden;
    background: linear-gradient(180deg, #f7f7f4 0, #ffffff 420px);
    color: #1d1e00;
}

.course-container {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

/* Hero */

.course-hero {
    padding: 60px 24px 38px;
    background: radial-gradient(
      circle at 86% 12%,
      rgba(207, 185, 125, 0.19),
      transparent 30%
    ),
    linear-gradient(180deg, #fbfbf8 0%, #f5f5f1 100%);
    border-bottom: 1px solid #e5e5df;
}

.course-hero__inner {
    text-align: center;
}

.course-hero__term {
    margin: 0 0 11px;
    color: #806b29;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.3;
    text-transform: uppercase;
}

.course-hero__title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    color: #181909;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.course-hero__code {
    color: #796624;
}

.course-hero__code::after {
    content: ":";
}

.course-hero__subtitle {
    max-width: 760px;
    margin: 17px auto 0;
    color: #62625e;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

.course-hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.course-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #cbb66f;
    border-radius: 10px;
    color: #4f4604 !important;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.course-action--primary {
    background: #1d1e00;
    border-color: #1d1e00;
    color: #cfb97d !important;
}

.course-action:hover,
.course-action:focus-visible {
    background: #4f4604;
    border-color: #4f4604;
    color: #ffffff !important;
    outline: none;
    transform: translateY(-1px);
}

/* Course banner */

.course-banner {
    padding: 30px 24px 0;
}

.course-banner img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    object-position: center;
    background: #ffffff;
    border: 1px solid #dfdfd9;
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.07),
    0 3px 10px rgba(0, 0, 0, 0.025);
}

/* Main content */

.course-content {
    padding: 32px 24px 72px;
}

.course-content__surface {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dfdfd9;
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.05),
    0 3px 10px rgba(0, 0, 0, 0.02);
}

.course-content__body {
    padding: clamp(28px, 4vw, 52px);
    color: #545450;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

.course-content__body > :first-child {
    margin-top: 0;
}

.course-content__body > :last-child {
    margin-bottom: 0;
}

.course-content__body h2 {
    position: relative;
    margin: 52px 0 19px;
    padding-top: 3px;
    color: #1d1e00;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: clamp(25px, 2.5vw, 32px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.course-content__body h2::before {
    display: block;
    width: 44px;
    height: 3px;
    margin-bottom: 12px;
    background: #c8ae5c;
    border-radius: 999px;
    content: "";
}

.course-content__body h3 {
    margin: 30px 0 12px;
    color: #27280f;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.course-content__body p {
    margin: 0 0 18px;
}

.course-content__body strong {
    color: #28290e;
    font-weight: 700;
}

.course-content__body a {
    color: #6f5d1b !important;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(111, 93, 27, 0.34);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.course-content__body a:hover,
.course-content__body a:focus {
    color: #1d1e00 !important;
    text-decoration-color: #c8ae5c;
}

/* Intro notice */

.course-content__body blockquote {
    margin: 0 0 28px;
    padding: 17px 19px;
    background: #f7f4e9;
    border: 1px solid #e3d7b3;
    border-left: 4px solid #b69b47;
    border-radius: 0 12px 12px 0;
    color: #4e4e48;
    font-size: 15px;
}

.course-content__body blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */

.course-content__body table {
    display: table;
    width: 100%;
    margin: 20px 0 34px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #deded8;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;
    color: #50504c;
    font-size: 14px;
    line-height: 1.45;
}

.course-content__body thead th {
    padding: 13px 14px;
    background: #20210d;
    border-right: 1px solid rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-weight: 700;
    text-align: left;
    vertical-align: middle;
}

.course-content__body thead th:last-child {
    border-right: 0;
}

.course-content__body tbody td {
    padding: 12px 14px;
    border-top: 1px solid #e7e7e2;
    border-right: 1px solid #ededE8;
    text-align: left;
    vertical-align: top;
}

.course-content__body tbody td:last-child {
    border-right: 0;
}

.course-content__body tbody tr:nth-child(even) {
    background: #faf9f4;
}

.course-content__body tbody tr:hover {
    background: #f5f1e3;
}

/* Back link */

.course-back-link {
    margin: 25px 0 0;
    text-align: center;
}

.course-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5f5019 !important;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.course-back-link a:hover,
.course-back-link a:focus {
    color: #1d1e00 !important;
}

/* Mobile */

@media (max-width: 700px) {

    .course-container {
      width: 100%;
  }

    .course-hero {
      padding: 43px 16px 31px;
  }

    .course-hero__title {
      display: block;
      font-size: 34px;
  }

    .course-hero__code,
  .course-hero__name {
      display: block;
  }

    .course-hero__code {
      margin-bottom: 5px;
      font-size: 20px;
      letter-spacing: 0.02em;
  }

    .course-hero__code::after {
      content: "";
  }

    .course-hero__subtitle {
      margin-top: 13px;
      font-size: 16px;
  }

    .course-hero__actions {
      align-items: stretch;
      flex-direction: column;
  }

    .course-action {
      width: 100%;
  }

    .course-banner {
      padding: 18px 12px 0;
  }

    .course-banner img {
      border-radius: 15px;
  }

    .course-content {
      padding: 18px 12px 50px;
  }

    .course-content__surface {
      border-radius: 17px;
  }

    .course-content__body {
      padding: 24px 17px 29px;
      font-size: 15px;
      line-height: 1.68;
  }

    .course-content__body h2 {
      margin-top: 42px;
      font-size: 25px;
  }

    .course-content__body table {
      display: block;
      overflow-x: auto;
      width: 100%;
      white-space: nowrap;
      -webkit-overflow-scrolling: touch;
  }

    .course-content__body thead th,
  .course-content__body tbody td {
      padding: 11px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {

    .course-action {
      transition: none;
  }
}

/* =========================================================
   Course quick-information panel
   ========================================================= */

.course-quick {
    padding: 28px 24px 0;
}

.course-quick__surface {
    padding: 28px 34px 30px;
    background: linear-gradient(
      135deg,
      #ffffff 0%,
      #fbfaf5 100%
    );
    border: 1px solid #dfdfd8;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.045),
    0 2px 7px rgba(0, 0, 0, 0.02);
    text-align: center;
}

.course-quick__title {
    margin: 0;
    color: #1d1e00;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Canvas and Piazza links */

.course-quick__links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.course-quick__links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #6f5d1b !important;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: 17px !important;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: underline;
    text-decoration-color: rgba(111, 93, 27, 0.4);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 160ms ease,
    text-decoration-color 160ms ease;
}

.course-quick__links a:hover,
.course-quick__links a:focus-visible {
    color: #1d1e00 !important;
    text-decoration-color: #c8ae5c;
    outline: none;
}

.course-quick__links a span {
    font-size: 13px;
    text-decoration: none;
}

.course-quick__separator {
    color: #a4a49d;
    font-size: 18px;
}

/* Course details */

.course-quick__details {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 9px;
    max-width: 900px;
    margin: 20px auto 0;
}

.course-quick__row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: #555550;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.5;
}

.course-quick__row dt {
    margin: 0;
    color: #35351e;
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-weight: 800;
}

.course-quick__row dt::after {
    content: ":";
}

.course-quick__row dd {
    margin: 0;
}

.course-quick__detail-separator {
    display: inline-block;
    margin: 0 8px;
    color: #b19c59;
}

/* Mobile */

@media (max-width: 700px) {

    .course-quick {
      padding: 18px 12px 0;
  }

    .course-quick__surface {
      padding: 23px 17px 25px;
      border-radius: 15px;
  }

    .course-quick__title {
      font-size: 25px;
  }

    .course-quick__links {
      gap: 9px;
      margin-top: 15px;
  }

    .course-quick__links a {
      font-size: 15px !important;
  }

    .course-quick__details {
      align-items: stretch;
      gap: 13px;
      margin-top: 19px;
  }

    .course-quick__row {
      display: block;
      font-size: 15px;
      text-align: left;
  }

    .course-quick__row dt {
      display: block;
      margin-bottom: 2px;
  }

    .course-quick__detail-separator {
      margin: 0 5px;
  }
}

/* Use one consistent dark-gold color for the full course title. */

.course-hero__title,
.course-hero__code,
.course-hero__name {
    color: #6f5d1b !important;
}

/* Compact course header and larger term label */

.course-hero {
    padding-top: 34px;
    padding-bottom: 26px;
}

.course-hero__term {
    margin-bottom: 8px;
    font-size: 18px !important;
    letter-spacing: 0.13em;
}

.course-hero__title {
    font-size: clamp(32px, 3.4vw, 46px);
}

.course-hero__subtitle {
    margin-top: 10px;
    font-size: 17px;
}

.course-hero__actions {
    margin-top: 18px;
}

.course-action {
    min-height: 39px;
    padding: 8px 14px;
}

.course-quick {
    padding-top: 20px;
}

@media (max-width: 700px) {

    .course-hero {
      padding-top: 28px;
      padding-bottom: 23px;
  }

    .course-hero__term {
      font-size: 15px !important;
  }

    .course-hero__title {
      font-size: 30px;
  }

    .course-hero__subtitle {
      margin-top: 9px;
      font-size: 15px;
  }

    .course-hero__actions {
      margin-top: 15px;
  }

    .course-quick {
      padding-top: 14px;
  }
}

/* Compact Quick Information panel */

.course-quick__surface {
    padding: 20px 28px 21px;
}

.course-quick__title {
    font-size: 27px;
}

.course-quick__links {
    margin-top: 12px;
}

.course-quick__details {
    gap: 5px;
    margin-top: 13px;
}

.course-quick__row {
    font-size: 16px;
    line-height: 1.4;
}

.course-quick__detail-separator {
    margin-right: 6px;
    margin-left: 6px;
}

@media (max-width: 700px) {

    .course-quick__surface {
      padding: 18px 15px 19px;
  }

    .course-quick__title {
      font-size: 23px;
  }

    .course-quick__links {
      margin-top: 10px;
  }

    .course-quick__details {
      gap: 8px;
      margin-top: 12px;
  }

    .course-quick__row {
      font-size: 14px;
  }
}

/* Larger course-table typography */

.course-content__body table {
    font-size: 16px;
    line-height: 1.5;
}

.course-content__body thead th {
    padding: 15px 16px;
    font-size: 16px;
    font-weight: 700;
}

.course-content__body tbody td {
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.5;
}

/* Emphasize lecture numbers slightly. */

.course-content__body tbody td:first-child {
    font-family: "Nunito Sans", "Nunito", sans-serif;
    font-size: 15px;
    font-weight: 600;
}

/* Keep the slide column easy to scan. */

.course-content__body thead th:last-child,
.course-content__body tbody td:last-child {
    font-size: 16px;
    text-align: center;
}

@media (max-width: 700px) {

    .course-content__body table {
      font-size: 15px;
  }

    .course-content__body thead th,
  .course-content__body tbody td {
      padding: 13px 14px;
      font-size: 15px;
  }

    .course-content__body tbody td:first-child {
      font-size: 14px;
  }
}

/* =========================================================
   Preferred classic-modern course table
   ========================================================= */

/* Center section headings such as Lectures and Assignments. */

.course-content__body h2 {
    margin: 46px 0 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e3e3de;
    font-size: 34px;
    font-weight: 500;
    text-align: center;
}

.course-content__body h2::before {
    display: none;
}

/* Table surface */

.course-content__body table {
    display: table;
    width: 100%;
    margin: 20px 0 38px;
    overflow: hidden;
    background: #ffffff;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 13px;
    color: #545454;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.4;
}

/* Dark header */

.course-content__body thead th {
    padding: 14px 16px;
    background: #292600;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.course-content__body thead th:first-child {
    width: 92px;
    border-radius: 12px 0 0 0;
}

.course-content__body thead th:last-child {
    width: 126px;
    border-right: 0;
    border-radius: 0 12px 0 0;
}

/* Rows */

.course-content__body tbody td {
    padding: 12px 16px;
    background: #ffffff;
    border: 0;
    border-right: 1px solid #e4e4df;
    color: #555555;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    vertical-align: middle;
}

.course-content__body tbody td:last-child {
    border-right: 0;
}

.course-content__body tbody tr:nth-child(even) td {
    background: #f3f1df;
}

.course-content__body tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.course-content__body tbody tr:hover td {
    background: #ece8ce;
}

/* Column alignment */

.course-content__body tbody td:first-child {
    width: 92px;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
}

.course-content__body tbody td:nth-child(2) {
    text-align: center;
}

.course-content__body tbody td:last-child {
    width: 126px;
    text-align: center;
}

/* Slide links */

.course-content__body tbody td:last-child a {
    color: #6f5d00 !important;
    font-size: 18px;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.course-content__body tbody td:last-child a:hover,
.course-content__body tbody td:last-child a:focus {
    color: #1d1e00 !important;
}

/* Mobile */

@media (max-width: 700px) {

    .course-content__body h2 {
      margin-top: 38px;
      font-size: 29px;
  }

    .course-content__body table {
      min-width: 680px;
      font-size: 16px;
  }

    .course-content__body thead th,
  .course-content__body tbody td {
      padding: 11px 13px;
      font-size: 16px;
  }

    .course-content__body tbody td:first-child,
  .course-content__body tbody td:last-child,
  .course-content__body tbody td:last-child a {
      font-size: 16px;
  }
}

/* =========================================================
   Correct three-column course tables
   Component | Weight | Description
   ========================================================= */

.course-content__body table:has(
  thead th:nth-child(3):last-child
) {
    table-layout: fixed;
}

/* Component */

.course-content__body table:has(
  thead th:nth-child(3):last-child
) thead th:first-child,
.course-content__body table:has(
  thead th:nth-child(3):last-child
) tbody td:first-child {
    width: 30%;
    padding-right: 18px;
    padding-left: 18px;
    text-align: left;
}

/* Weight */

.course-content__body table:has(
  thead th:nth-child(3):last-child
) thead th:nth-child(2),
.course-content__body table:has(
  thead th:nth-child(3):last-child
) tbody td:nth-child(2) {
    width: 14%;
    text-align: center;
}

/* Description */

.course-content__body table:has(
  thead th:nth-child(3):last-child
) thead th:last-child,
.course-content__body table:has(
  thead th:nth-child(3):last-child
) tbody td:last-child {
    width: 56%;
    padding-right: 18px;
    padding-left: 18px;
    text-align: left;
    white-space: normal;
}

/* Prevent unnecessary narrow text wrapping. */

.course-content__body table:has(
  thead th:nth-child(3):last-child
) tbody td {
    overflow-wrap: normal;
    word-break: normal;
}

@media (max-width: 700px) {

    .course-content__body table:has(
    thead th:nth-child(3):last-child
  ) {
      min-width: 760px;
  }
}

/* =========================================================
   AI course lecture-table column proportions
   ========================================================= */

.course-content__body table:has(
  thead th:nth-child(5):last-child
) {
    table-layout: fixed;
}

/* No. — narrower */

.course-content__body table:has(
  thead th:nth-child(5):last-child
) th:nth-child(1),
.course-content__body table:has(
  thead th:nth-child(5):last-child
) td:nth-child(1) {
    width: 7% !important;
    padding-right: 8px;
    padding-left: 8px;
}

/* Date */

.course-content__body table:has(
  thead th:nth-child(5):last-child
) th:nth-child(2),
.course-content__body table:has(
  thead th:nth-child(5):last-child
) td:nth-child(2) {
    width: 14% !important;
}

/* Topics — slightly narrower */

.course-content__body table:has(
  thead th:nth-child(5):last-child
) th:nth-child(3),
.course-content__body table:has(
  thead th:nth-child(5):last-child
) td:nth-child(3) {
    width: 42% !important;
}

/* Slides */

.course-content__body table:has(
  thead th:nth-child(5):last-child
) th:nth-child(4),
.course-content__body table:has(
  thead th:nth-child(5):last-child
) td:nth-child(4) {
    width: 9% !important;
}

/* Reference Materials — substantially wider */

.course-content__body table:has(
  thead th:nth-child(5):last-child
) th:nth-child(5),
.course-content__body table:has(
  thead th:nth-child(5):last-child
) td:nth-child(5) {
    width: 28% !important;
    padding-right: 16px;
    padding-left: 16px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

/* Keep reference links readable rather than narrowly centered. */

.course-content__body table:has(
  thead th:nth-child(5):last-child
) td:nth-child(5) {
    text-align: left;
}

@media (max-width: 700px) {

    .course-content__body table:has(
    thead th:nth-child(5):last-child
  ) {
      min-width: 1000px;
  }
}

/* =========================================================
   AI course assignment-table column proportions
   ========================================================= */

.course-content__body #assignments + table {
    table-layout: fixed;
}

/* No. */

.course-content__body #assignments + table th:nth-child(1),
.course-content__body #assignments + table td:nth-child(1) {
    width: 7% !important;
    padding-right: 8px;
    padding-left: 8px;
    text-align: center;
}

/* Release Date */

.course-content__body #assignments + table th:nth-child(2),
.course-content__body #assignments + table td:nth-child(2) {
    width: 16% !important;
    text-align: center;
    white-space: normal;
}

/* Due Date */

.course-content__body #assignments + table th:nth-child(3),
.course-content__body #assignments + table td:nth-child(3) {
    width: 16% !important;
    text-align: center;
    white-space: normal;
}

/* Assignment */

.course-content__body #assignments + table th:nth-child(4),
.course-content__body #assignments + table td:nth-child(4) {
    width: 43% !important;
    padding-right: 18px;
    padding-left: 18px;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

/* Link */

.course-content__body #assignments + table th:nth-child(5),
.course-content__body #assignments + table td:nth-child(5) {
    width: 18% !important;
    padding-right: 14px;
    padding-left: 14px;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

/* Undo the lecture-table alignment inherited by this table. */

.course-content__body #assignments + table td:nth-child(4) strong {
    display: inline;
}

@media (max-width: 700px) {

    .course-content__body #assignments + table {
      min-width: 880px;
  }
}

/* Center the Assignment column. */

.course-content__body #assignments ~ table th:nth-child(4),
.course-content__body #assignments ~ table td:nth-child(4) {
    text-align: center !important;
}

/* Center-align the Final Project table content. */

.course-content__body table:has(
  thead th:nth-child(3):last-child
) th,
.course-content__body table:has(
  thead th:nth-child(3):last-child
) td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Larger body text for course content */

.course-content__body {
    font-size: 18px;
    line-height: 1.75;
}

.course-content__body p,
.course-content__body li {
    font-size: 18px;
    line-height: 1.75;
}

.course-content__body strong {
    font-size: inherit;
}

@media (max-width: 700px) {

    .course-content__body {
      font-size: 16px;
  }

    .course-content__body p,
  .course-content__body li {
      font-size: 16px;
      line-height: 1.7;
  }
}

/* Justify course body text while keeping tables and headings unchanged. */

.course-content__body p,
.course-content__body li {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

@media (max-width: 700px) {

    .course-content__body p,
  .course-content__body li {
      text-align: left;
      hyphens: none;
  }
}

/* =========================================================
   Advanced Computer Vision lecture table
   No. | Topic | Slides
   ========================================================= */

.course-content__body #advancedcv-lectures + table {
    width: 100% !important;
    table-layout: fixed !important;
}

/* No. */

.course-content__body #advancedcv-lectures + table th:nth-child(1),
.course-content__body #advancedcv-lectures + table td:nth-child(1) {
    width: 10% !important;
    padding-right: 12px !important;
    padding-left: 12px !important;
    text-align: center !important;
}

/* Topic */

.course-content__body #advancedcv-lectures + table th:nth-child(2),
.course-content__body #advancedcv-lectures + table td:nth-child(2) {
    width: 75% !important;
    padding-right: 18px !important;
    padding-left: 18px !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

/* Slides */

.course-content__body #advancedcv-lectures + table th:nth-child(3),
.course-content__body #advancedcv-lectures + table td:nth-child(3) {
    width: 15% !important;
    padding-right: 12px !important;
    padding-left: 12px !important;
    text-align: center !important;
    white-space: normal !important;
}

/* Restore the preferred larger typography. */

.course-content__body #advancedcv-lectures + table th,
.course-content__body #advancedcv-lectures + table td {
    font-size: 18px !important;
    line-height: 1.45 !important;
    vertical-align: middle !important;
}

@media (max-width: 700px) {

    .course-content__body #advancedcv-lectures + table {
      min-width: 700px;
  }

    .course-content__body #advancedcv-lectures + table th,
  .course-content__body #advancedcv-lectures + table td {
      font-size: 16px !important;
  }
}

/* Larger Advanced CV lecture-table text */

.course-content__body #advancedcv-lectures + table th {
    font-size: 20px !important;
}

.course-content__body #advancedcv-lectures + table td {
    font-size: 19px !important;
    line-height: 1.5 !important;
}

@media (max-width: 700px) {

    .course-content__body #advancedcv-lectures + table th,
  .course-content__body #advancedcv-lectures + table td {
      font-size: 17px !important;
  }
}

/* Larger, more compact course-description text */

.course-content__body {
    font-size: 19px;
    line-height: 1.5;
}

.course-content__body p,
.course-content__body li {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 19px;
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
}

.course-content__body p + p {
    margin-top: 6px;
}

@media (max-width: 700px) {

    .course-content__body,
  .course-content__body p,
  .course-content__body li {
      font-size: 17px;
      line-height: 1.55;
  }

    .course-content__body p,
  .course-content__body li {
      margin-bottom: 11px;
      text-align: left;
  }
}

/* Refined course-body typography */

.course-content__body {
    color: #45453f;
    font-size: 19px;
    line-height: 1.48;
}

.course-content__body p,
.course-content__body li {
    margin: 0 0 13px;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.48;
    letter-spacing: -0.008em;
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
    hyphens: auto;
    overflow-wrap: normal;
    word-break: normal;
}

.course-content__body p + p {
    margin-top: 4px;
}

.course-content__body strong {
    color: #1f2107;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Keep the final paragraph closer to the next heading. */

.course-content__body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {

    .course-content__body {
      font-size: 17px;
      line-height: 1.55;
  }

    .course-content__body p,
  .course-content__body li {
      margin-bottom: 12px;
      font-size: 17px;
      line-height: 1.55;
      letter-spacing: 0;
      text-align: left;
      hyphens: none;
  }
}

/* Slightly more compact Advanced CV lecture table */

.course-content__body #advancedcv-lectures + table thead th {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.course-content__body #advancedcv-lectures + table tbody td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    line-height: 1.35 !important;
}

/* Restore readable Markdown lists inside course pages. */

.course-content__body ul {
    margin: 10px 0 18px;
    padding-left: 28px;
    list-style-type: disc !important;
    list-style-position: outside !important;
}

.course-content__body ul li {
    display: list-item !important;
    margin: 5px 0;
    padding-left: 4px;
    list-style-type: disc !important;
    font-size: 19px;
    line-height: 1.48;
    text-align: left;
}

.course-content__body ul li::marker {
    color: #806b29;
    font-size: 0.9em;
}

/* Preserve numbered lists as numbered lists. */

.course-content__body ol {
    margin: 10px 0 18px;
    padding-left: 30px;
    list-style-type: decimal !important;
    list-style-position: outside !important;
}

.course-content__body ol li {
    display: list-item !important;
    margin: 5px 0;
    padding-left: 4px;
    list-style-type: decimal !important;
    text-align: left;
}

@media (max-width: 700px) {

    .course-content__body ul,
  .course-content__body ol {
      padding-left: 24px;
  }

    .course-content__body ul li,
  .course-content__body ol li {
      font-size: 17px;
  }
}

/* =========================================================
   Senior-design project pages
   ========================================================= */

.senior-design-lead {
    max-width: 980px;
    margin: 0 auto 24px;
    color: #4a4a43;
    font-size: 20px !important;
    line-height: 1.55 !important;
    text-align: center !important;
    text-justify: auto;
}

.senior-design-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 25px 0 30px;
}

.senior-design-gallery figure {
    margin: 0;
    overflow: hidden;
    background: #f7f6f0;
    border: 1px solid #deddd5;
    border-radius: 16px;
    box-shadow: 0 9px 25px rgba(0, 0, 0, 0.055),
    0 2px 5px rgba(0, 0, 0, 0.025);
}

.senior-design-gallery a {
    display: block;
    width: 100%;
}

.senior-design-gallery img,
.senior-design-gallery video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    background: #f7f6f0;
    object-fit: contain;
}

@media (max-width: 900px) {

    .senior-design-gallery {
      grid-template-columns: repeat(2, minmax(0, 1fr));
  }

    .senior-design-gallery figure:last-child {
      grid-column: 1 / -1;
      max-width: 560px;
      width: 100%;
      margin: 0 auto;
  }
}

@media (max-width: 600px) {

    .senior-design-lead {
      margin-bottom: 18px;
      font-size: 17px !important;
      line-height: 1.55 !important;
      text-align: left !important;
  }

    .senior-design-gallery {
      grid-template-columns: 1fr;
      gap: 14px;
      margin-top: 19px;
  }

    .senior-design-gallery figure:last-child {
      grid-column: auto;
      max-width: none;
  }
}

/* =========================================================
   Advanced CV responsive tables
   ========================================================= */

@media (max-width: 700px) {
    /* -------------------------
     Lecture table
     ------------------------- */

    .course-content__body
  #advancedcv-lectures + table {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      margin: 16px 0 30px !important;
      overflow: visible !important;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      table-layout: auto !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-lectures + table thead {
      display: none !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody {
      display: grid !important;
      gap: 8px;
  }

    .course-content__body
  #advancedcv-lectures + table tbody tr {
      display: grid !important;
      grid-template-columns: 44px minmax(0, 1fr) auto;
      align-items: center;
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #e1e1db;
      border-radius: 10px;
  }

    .course-content__body
  #advancedcv-lectures + table tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td {
      display: block !important;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 10px !important;
      background: transparent !important;
      border: 0 !important;
      font-size: 16px !important;
      line-height: 1.35 !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(1) {
      padding-right: 6px !important;
      padding-left: 6px !important;
      border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
      text-align: center !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(2) {
      overflow-wrap: anywhere;
      text-align: left !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) {
      min-width: 54px !important;
      padding-left: 6px !important;
      text-align: center !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 32px;
      padding: 5px 9px;
      background: #242500;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 13px !important;
      text-decoration: none !important;
  }
    /* -------------------------
     Assignment table
     ------------------------- */

    .course-content__body
  #assignments ~ table {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      margin: 16px 0 30px !important;
      overflow: visible !important;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      table-layout: auto !important;
      white-space: normal !important;
  }

    .course-content__body
  #assignments ~ table thead {
      display: none !important;
  }

    .course-content__body
  #assignments ~ table tbody {
      display: grid !important;
      gap: 9px;
  }

    .course-content__body
  #assignments ~ table tbody tr {
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr);
      grid-template-areas: "number assignment"
      "release release"
      "due due";
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #e1e1db;
      border-radius: 11px;
  }

    .course-content__body
  #assignments ~ table tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content__body
  #assignments ~ table tbody td {
      display: block !important;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 11px !important;
      background: transparent !important;
      border: 0 !important;
      font-size: 16px !important;
      line-height: 1.4 !important;
      white-space: normal !important;
  }

    .course-content__body
  #assignments ~ table tbody td:nth-child(1) {
      grid-area: number;
      display: flex !important;
      align-items: center;
      justify-content: center;
      padding-right: 5px !important;
      padding-left: 5px !important;
      border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
      text-align: center !important;
  }

    .course-content__body
  #assignments ~ table tbody td:nth-child(2) {
      grid-area: assignment;
      overflow-wrap: anywhere;
      text-align: left !important;
  }

    .course-content__body
  #assignments ~ table tbody td:nth-child(3) {
      grid-area: release;
  }

    .course-content__body
  #assignments ~ table tbody td:nth-child(4) {
      grid-area: due;
  }

    .course-content__body
  #assignments ~ table tbody td:nth-child(3),
  .course-content__body
  #assignments ~ table tbody td:nth-child(4) {
      display: grid !important;
      grid-template-columns: 72px minmax(0, 1fr);
      gap: 8px;
      padding-top: 7px !important;
      padding-bottom: 7px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      text-align: left !important;
  }

    .course-content__body
  #assignments ~ table tbody td:nth-child(3)::before {
      color: #75621f;
      content: "Release";
      font-weight: 700;
  }

    .course-content__body
  #assignments ~ table tbody td:nth-child(4)::before {
      color: #75621f;
      content: "Due";
      font-weight: 700;
  }
}

/* =========================================================
   Final mobile course-page refinements
   ========================================================= */

.course-external-icon {
    display: inline-block;
    margin-left: 3px;
    font-size: 0.78em;
    line-height: 1;
}

/* Modern back-to-courses link */

.course-back-link a {
    padding: 9px 14px;
    background: #ffffff;
    border: 1px solid #d6c486;
    border-radius: 10px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.045);
}

@media (max-width: 700px) {
    /* -------------------------------------------------------
     Quick Information
     ------------------------------------------------------- */

    .course-quick {
      padding: 14px 10px 0 !important;
  }

    .course-quick__surface {
      padding: 16px !important;
      border-radius: 15px !important;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06),
      0 2px 7px rgba(0, 0, 0, 0.025) !important;
  }

    .course-quick__title {
      font-size: 22px !important;
      line-height: 1.2 !important;
  }

    .course-quick__links {
      display: flex !important;
      align-items: stretch;
      gap: 8px !important;
      margin-top: 13px !important;
  }

    .course-quick__separator {
      display: none !important;
  }

    .course-quick__links a {
      display: flex !important;
      align-items: center;
      justify-content: center;
      flex: 1 1 0;
      min-height: 42px;
      padding: 8px 9px;
      background: #f7f4e8;
      border: 1px solid #ddcf9f;
      border-radius: 10px;
      font-size: 14px !important;
      line-height: 1.25 !important;
      text-align: center;
      text-decoration: none !important;
  }

    .course-quick__details {
      gap: 0 !important;
      margin-top: 13px !important;
  }

    .course-quick__row {
      display: grid !important;
      grid-template-columns: 96px minmax(0, 1fr);
      gap: 9px;
      width: 100%;
      padding: 8px 0;
      border-top: 1px solid #e8e4d6;
      font-size: 14px !important;
      line-height: 1.4 !important;
      text-align: left !important;
  }

    .course-quick__row dt,
  .course-quick__row dd {
      text-align: left !important;
  }

    .course-quick__detail-separator {
      display: block;
      overflow: hidden;
      width: 0;
      height: 0;
      margin: 0;
  }
    /* -------------------------------------------------------
     Advanced CV lecture table
     ------------------------------------------------------- */

    .course-content__body
  #advancedcv-lectures + table {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      margin: 16px 0 30px !important;
      overflow: visible !important;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      table-layout: auto !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-lectures + table thead {
      display: none !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody {
      display: grid !important;
      gap: 8px;
  }

    .course-content__body
  #advancedcv-lectures + table tbody tr {
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr) 52px;
      align-items: center;
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #deded7;
      border-radius: 11px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.035);
  }

    .course-content__body
  #advancedcv-lectures + table tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td {
      display: block !important;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 8px !important;
      background: transparent !important;
      border: 0 !important;
      font-size: 16px !important;
      line-height: 1.35 !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(1) {
      color: #725f1d;
      font-weight: 700;
      text-align: center !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(2) {
      padding-right: 10px !important;
      padding-left: 10px !important;
      overflow-wrap: anywhere;
      text-align: left !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) {
      text-align: center !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 31px;
      padding: 5px 8px;
      background: #252600;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 12px !important;
      text-decoration: none !important;
  }
    /* -------------------------------------------------------
     Advanced CV assignment table
     ------------------------------------------------------- */

    .course-content__body
  #advancedcv-assignments ~ table {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      margin: 16px 0 30px !important;
      overflow: visible !important;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      table-layout: auto !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table thead {
      display: none !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody {
      display: grid !important;
      gap: 9px;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody tr {
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr);
      grid-template-areas: "number assignment"
      "release release"
      "due due";
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #deded7;
      border-radius: 12px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td {
      display: block !important;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 11px !important;
      background: transparent !important;
      border: 0 !important;
      font-size: 16px !important;
      line-height: 1.4 !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(1) {
      grid-area: number;
      display: flex !important;
      align-items: center;
      justify-content: center;
      color: #725f1d;
      font-weight: 700;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(2) {
      grid-area: assignment;
      overflow-wrap: anywhere;
      text-align: left !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3) {
      grid-area: release;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(4) {
      grid-area: due;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3),
  .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(4) {
      display: grid !important;
      grid-template-columns: 78px minmax(0, 1fr);
      gap: 8px;
      padding-top: 7px !important;
      padding-bottom: 7px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      text-align: left !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3)::before {
      color: #725f1d;
      content: "Release";
      font-weight: 700;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(4)::before {
      color: #725f1d;
      content: "Due";
      font-weight: 700;
  }
    /* Compact course back link */

    .course-back-link {
      margin-top: 18px !important;
  }

    .course-back-link a {
      min-height: 42px;
      padding: 9px 14px;
      border-radius: 10px;
      font-size: 14px !important;
  }
}

/* Final phone-friendly course hero */

@media (max-width: 700px) {

    .course-hero {
      padding: 24px 12px 20px !important;
  }

    .course-hero__term {
      margin-bottom: 8px !important;
      font-size: 13px !important;
  }

    .course-hero__title {
      display: block !important;
      margin: 0 !important;
      font-size: inherit !important;
      line-height: 1.08 !important;
  }

    .course-hero__code {
      display: block !important;
      margin-bottom: 6px !important;
      font-size: 18px !important;
      line-height: 1.2 !important;
  }

    .course-hero__name {
      display: block !important;
      font-size: clamp(24px, 6.6vw, 24px) !important;
      line-height: 1.08 !important;
      letter-spacing: -0.025em !important;
      white-space: nowrap;
  }

    .course-hero__subtitle {
      margin-top: 10px !important;
      font-size: 14px !important;
      line-height: 1.4 !important;
  }

    .course-hero__actions {
      margin-top: 15px !important;
  }

    .course-action {
      min-height: 40px !important;
      padding: 8px 13px !important;
      font-size: 12px !important;
  }
}

/* Justify course text on phones */

@media (max-width: 700px) {

    .course-content__body p,
  .course-content__body li {
      text-align: justify !important;
      text-align-last: left;
      text-justify: inter-word;
      -webkit-hyphens: auto;
      hyphens: auto;
  }
}

/* Justify course text on phones without hyphenation */

@media (max-width: 700px) {

    .course-content__body p,
  .course-content__body li {
      text-align: justify !important;
      text-align-last: left;
      text-justify: inter-word;
      -webkit-hyphens: none !important;
      hyphens: none !important;
      overflow-wrap: normal;
      word-break: normal;
  }
}

/* Remove divider beside lecture numbers on phones */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-lectures + table
  tbody td:nth-child(1) {
      border-right: 0 !important;
      box-shadow: none !important;
  }
}

/* More compact Advanced CV lecture cards on phones */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-lectures + table {
      margin-top: 12px !important;
      margin-bottom: 24px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody {
      gap: 5px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody tr {
      grid-template-columns: 38px minmax(0, 1fr) 34px !important;
      border-radius: 9px !important;
      box-shadow: none !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td {
      padding-top: 6px !important;
      padding-bottom: 6px !important;
      font-size: 16px !important;
      line-height: 1.28 !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(1) {
      padding-right: 3px !important;
      padding-left: 3px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(2) {
      padding-right: 6px !important;
      padding-left: 5px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) {
      padding-right: 5px !important;
      padding-left: 2px !important;
  }
}

/* Balance horizontal spacing in mobile lecture cards */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-lectures + table tbody tr {
      grid-template-columns: 42px minmax(0, 1fr) 42px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(1),
  .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) {
      display: flex !important;
      align-items: center;
      justify-content: center;
      padding-right: 6px !important;
      padding-left: 6px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(2) {
      padding-right: 10px !important;
      padding-left: 7px !important;
  }
}

/* Responsive Advanced CV lecture cards on narrow phones */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-lectures + table {
      width: 100% !important;
      max-width: 100% !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody tr {
      position: relative;
      grid-template-columns: 38px minmax(0, 1fr) !important;
      width: 100% !important;
      max-width: 100% !important;
  }
    /* Reserve a third column only when a Slides link exists. */

    .course-content__body
  #advancedcv-lectures + table tbody tr:has(
    td:nth-child(3) a
  ) {
      grid-template-columns: 38px minmax(0, 1fr) 44px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(1) {
      display: flex !important;
      align-items: center;
      justify-content: center;
      padding: 6px 3px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(2) {
      min-width: 0 !important;
      padding: 6px 8px !important;
      overflow-wrap: normal !important;
      word-break: normal !important;
  }
    /* Hide empty dash cells. */

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) {
      display: none !important;
  }
    /* Show the Slides cell when it contains a real link. */

    .course-content__body
  #advancedcv-lectures + table tbody tr:has(
    td:nth-child(3) a
  ) td:nth-child(3) {
      display: flex !important;
      align-items: center;
      justify-content: center;
      padding: 4px !important;
  }
}

/* Extra space recovery on unusually narrow screens */

@media (max-width: 380px) {

    .course-content {
      padding-right: 6px !important;
      padding-left: 6px !important;
  }

    .course-content__body {
      padding-right: 10px !important;
      padding-left: 10px !important;
  }
}

/* Fix clipped lecture numbers on narrow phones */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-lectures + table tbody tr {
      grid-template-columns: 50px minmax(0, 1fr) !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(1) {
      display: flex !important;
      align-items: center;
      justify-content: flex-start;
      box-sizing: border-box !important;
      width: 100% !important;
      min-width: 0 !important;
      padding: 6px 4px 6px 10px !important;
      overflow: visible !important;
      text-align: left !important;
      white-space: nowrap !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(2) {
      box-sizing: border-box !important;
      width: 100% !important;
      min-width: 0 !important;
      padding: 6px 10px 6px 2px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) {
      display: none !important;
  }
}

/* Restore mobile Slides links when available */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-lectures + table tbody tr:has(
    td:nth-child(3) a
  ) {
      grid-template-columns: 50px minmax(0, 1fr) 52px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody tr:has(
    td:nth-child(3) a
  ) td:nth-child(3) {
      display: flex !important;
      align-items: center;
      justify-content: center;
      box-sizing: border-box !important;
      width: 100% !important;
      min-width: 0 !important;
      padding: 4px 6px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 30px;
      padding: 5px 8px;
      background: #242500;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 12px !important;
      line-height: 1 !important;
      text-decoration: none !important;
  }
}

/* Always show the Slides column on mobile */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-lectures + table tbody tr {
      display: grid !important;
      grid-template-columns: 48px minmax(0, 1fr) 48px !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(1) {
      display: flex !important;
      align-items: center;
      justify-content: flex-start;
      width: 100% !important;
      min-width: 0 !important;
      padding: 6px 4px 6px 10px !important;
      white-space: nowrap !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(2) {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      padding: 6px 8px !important;
      text-align: left !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) {
      display: flex !important;
      align-items: center;
      justify-content: center;
      box-sizing: border-box !important;
      width: 100% !important;
      min-width: 0 !important;
      padding: 4px 7px !important;
      color: #66665f;
      text-align: center !important;
      white-space: nowrap !important;
  }

    .course-content__body
  #advancedcv-lectures + table tbody td:nth-child(3) a {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      min-height: 29px;
      padding: 5px 7px;
      background: #242500;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 12px !important;
      line-height: 1 !important;
      text-decoration: none !important;
  }
}

/* Compact Advanced CV assignment cards on phones */

@media (max-width: 700px) {

    .course-content__body
  #advancedcv-assignments ~ table {
      margin-top: 12px !important;
      margin-bottom: 24px !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody {
      gap: 6px !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody tr {
      display: flex !important;
      flex-wrap: wrap;
      border-radius: 10px !important;
      box-shadow: none !important;
  }
    /* Assignment number */

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(1) {
      display: flex !important;
      align-items: center;
      justify-content: center;
      flex: 0 0 46px;
      padding: 7px 5px !important;
      border-right: 0 !important;
  }
    /* Assignment title */

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(2) {
      flex: 1 1 calc(100% - 46px);
      padding: 7px 10px !important;
      font-size: 16px !important;
      line-height: 1.35 !important;
  }
    /* Release and Due share one row */

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3),
  .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(4) {
      display: flex !important;
      align-items: center;
      gap: 7px;
      flex: 0 0 50%;
      padding: 6px 10px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      font-size: 14px !important;
      line-height: 1.3 !important;
      white-space: normal !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3) {
      border-right: 1px solid rgba(0, 0, 0, 0.07) !important;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3)::before,
  .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(4)::before {
      flex: 0 0 auto;
      color: #725f1d;
      font-size: 13px;
      font-weight: 700;
  }
}

/* Stack dates only on exceptionally narrow screens */

@media (max-width: 360px) {

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3),
  .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(4) {
      flex-basis: 100%;
  }

    .course-content__body
  #advancedcv-assignments ~ table tbody td:nth-child(3) {
      border-right: 0 !important;
  }
}

/* =========================================================
   Alternating course-content sections
   ========================================================= */

.course-content__body--sectioned {
    padding: 0 !important;
}

/* Content appearing before the first H2. */

.course-content-preamble {
    padding: clamp(28px, 4vw, 48px)
    clamp(24px, 4vw, 52px);
    background: #ffffff;
}

/* Individual course sections. */

.course-content-section {
    padding: clamp(36px, 4vw, 52px)
    clamp(24px, 4vw, 52px);
    border-top: 1px solid #e1e1dc;
}

/* Course Description, Software Environment, etc. */

.course-content-section:nth-of-type(odd) {
    background: #f4f5f2;
}

/* Course Logistics, Lectures, Assignments, etc. */

.course-content-section:nth-of-type(even) {
    background: #ffffff;
}

/* Reset old section-heading spacing. */

.course-content-section > h2 {
    margin: 0 0 21px !important;
    padding-top: 0 !important;
    padding-bottom: 13px !important;
}

/* Avoid excessive bottom space inside each section. */

.course-content-section > :last-child {
    margin-bottom: 0 !important;
}

/* Keep tables visually separated from section backgrounds. */

.course-content-section table {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.045);
}

/* Mobile */

@media (max-width: 700px) {

    .course-content-preamble {
      padding: 21px 16px;
  }

    .course-content-section {
      padding: 27px 16px 30px;
  }

    .course-content-section > h2 {
      margin-bottom: 17px !important;
      padding-bottom: 11px !important;
  }

    .course-content-section:nth-of-type(odd) {
      background: #f5f5f1;
  }

    .course-content-section:nth-of-type(even) {
      background: #ffffff;
  }
    /* * Mobile table cards already have their own borders,
   * so they do not need an additional large shadow. */

    .course-content-section table {
      box-shadow: none;
  }
}

/* =========================================================
   AI for Engineering mobile tables
   ========================================================= */

@media (max-width: 700px) {
    /* * Shared reset for the four AI course tables.
   * These selectors are scoped to their generated sections
   * so Advanced CV and other courses remain unchanged. */

    .course-content-section:has(> #ai-course-logistics) table,
  .course-content-section:has(> #ai-final-project) table,
  .course-content-section:has(> #ai-lectures) table,
  .course-content-section:has(> #ai-assignments) table {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100% !important;
      margin: 14px 0 24px !important;
      overflow: visible !important;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      table-layout: auto !important;
      white-space: normal !important;
      box-shadow: none !important;
  }

    .course-content-section:has(> #ai-course-logistics) thead,
  .course-content-section:has(> #ai-final-project) thead,
  .course-content-section:has(> #ai-lectures) thead,
  .course-content-section:has(> #ai-assignments) thead {
      display: none !important;
  }

    .course-content-section:has(> #ai-course-logistics) tbody,
  .course-content-section:has(> #ai-final-project) tbody,
  .course-content-section:has(> #ai-lectures) tbody,
  .course-content-section:has(> #ai-assignments) tbody {
      display: grid !important;
      gap: 7px;
  }

    .course-content-section:has(> #ai-course-logistics) tbody tr,
  .course-content-section:has(> #ai-final-project) tbody tr,
  .course-content-section:has(> #ai-lectures) tbody tr,
  .course-content-section:has(> #ai-assignments) tbody tr {
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #deded7;
      border-radius: 11px;
      box-shadow: 0 3px 11px rgba(0, 0, 0, 0.035);
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody tr:nth-child(even),

  .course-content-section:has(> #ai-final-project)
  tbody tr:nth-child(even),

  .course-content-section:has(> #ai-lectures)
  tbody tr:nth-child(even),

  .course-content-section:has(> #ai-assignments)
  tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content-section:has(> #ai-course-logistics) tbody td,
  .course-content-section:has(> #ai-final-project) tbody td,
  .course-content-section:has(> #ai-lectures) tbody td,
  .course-content-section:has(> #ai-assignments) tbody td {
      box-sizing: border-box !important;
      width: auto !important;
      min-width: 0 !important;
      padding: 8px 10px !important;
      background: transparent !important;
      border: 0 !important;
      font-size: 15px !important;
      line-height: 1.4 !important;
      text-align: left !important;
      white-space: normal !important;
      overflow-wrap: anywhere;
      word-break: normal !important;
  }
    /* =======================================================
     Course Logistics
     Assignment | Grade Weightage
     ======================================================= */

    .course-content-section:has(> #ai-course-logistics)
  tbody tr {
      display: grid !important;
      grid-template-columns: minmax(116px, 0.75fr)
      minmax(0, 1.65fr);
      align-items: stretch;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:first-child {
      display: flex !important;
      align-items: center;
      padding: 9px 10px !important;
      background: #292a08 !important;
      border-right: 1px solid rgba(255, 255, 255, 0.09) !important;
      color: #cfb97d;
      font-family: "Nunito Sans", "Nunito", sans-serif;
      font-weight: 700;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:nth-child(2) {
      display: flex !important;
      align-items: center;
      padding: 9px 11px !important;
  }
    /* =======================================================
     Final Project
     Component | Weight | Description
     ======================================================= */

    .course-content-section:has(> #ai-final-project)
  tbody tr {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) 66px;
      grid-template-areas: "component weight"
      "description description";
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(1) {
      grid-area: component;
      display: flex !important;
      align-items: center;
      padding: 9px 11px !important;
      color: #252600;
      font-weight: 700;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(2) {
      grid-area: weight;
      display: flex !important;
      align-items: center;
      justify-content: center;
      margin: 6px 7px 6px 0;
      padding: 5px 7px !important;
      background: #292a08 !important;
      border-radius: 8px;
      color: #cfb97d;
      font-weight: 700;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(3) {
      grid-area: description;
      padding: 8px 11px 10px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.075) !important;
  }
    /* =======================================================
     Lectures
     No. | Date | Topics | Slides | References
     ======================================================= */

    .course-content-section:has(> #ai-lectures)
  tbody tr {
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      grid-template-areas: "number date slides"
      "topic topic topic"
      "references references references";
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(1) {
      grid-area: number;
      display: flex !important;
      align-items: center;
      justify-content: center;
      color: #725f1d;
      font-weight: 700;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(2) {
      grid-area: date;
      display: flex !important;
      align-items: center;
      padding-left: 4px !important;
      color: #55564f;
      font-size: 14px !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(3) {
      grid-area: topic;
      padding: 9px 11px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      font-size: 16px !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(4) {
      grid-area: slides;
      display: flex !important;
      align-items: center;
      justify-content: center;
      padding: 5px 8px !important;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(4) a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 30px;
      padding: 5px 9px;
      background: #292a08;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 12px !important;
      line-height: 1 !important;
      text-decoration: none !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(5) {
      grid-area: references;
      padding: 8px 11px 10px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      font-size: 14px !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(5)::before {
      display: block;
      margin-bottom: 5px;
      color: #725f1d;
      content: "Reference materials";
      font-family: "Nunito Sans", "Nunito", sans-serif;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(5) a {
      display: inline;
      font-size: 14px !important;
  }
    /* =======================================================
     Assignments
     No. | Release | Due | Assignment | Link
     ======================================================= */

    .course-content-section:has(> #ai-assignments)
  tbody tr {
      display: flex !important;
      flex-wrap: wrap;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(1) {
      order: 1;
      flex: 0 0 44px;
      display: flex !important;
      align-items: center;
      justify-content: center;
      color: #725f1d;
      font-weight: 700;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(4) {
      order: 2;
      flex: 1 1 calc(100% - 44px);
      padding: 8px 10px !important;
      font-size: 16px !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2),

  .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3) {
      display: flex !important;
      align-items: center;
      gap: 7px;
      flex: 0 0 50%;
      padding: 6px 9px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      font-size: 14px !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2) {
      order: 3;
      border-right: 1px solid rgba(0, 0, 0, 0.07) !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3) {
      order: 4;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2)::before {
      color: #725f1d;
      content: "Release";
      font-size: 12px;
      font-weight: 800;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3)::before {
      color: #725f1d;
      content: "Due";
      font-size: 12px;
      font-weight: 800;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(5) {
      order: 5;
      flex: 0 0 100%;
      padding: 7px 10px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(5) a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 31px;
      padding: 5px 11px;
      background: #292a08;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 12px !important;
      text-decoration: none !important;
  }
}

/* Stack assignment dates on exceptionally narrow phones. */

@media (max-width: 360px) {

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2),

  .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3) {
      flex-basis: 100%;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2) {
      border-right: 0 !important;
  }
}

/* =========================================================
   AI for Engineering mobile tables
   ========================================================= */

@media (max-width: 700px) {
    /* * Shared reset for the four AI course tables.
   * These selectors are scoped to their generated sections
   * so Advanced CV and other courses remain unchanged. */

    .course-content-section:has(> #ai-course-logistics) table,
  .course-content-section:has(> #ai-final-project) table,
  .course-content-section:has(> #ai-lectures) table,
  .course-content-section:has(> #ai-assignments) table {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100% !important;
      margin: 14px 0 24px !important;
      overflow: visible !important;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      table-layout: auto !important;
      white-space: normal !important;
      box-shadow: none !important;
  }

    .course-content-section:has(> #ai-course-logistics) thead,
  .course-content-section:has(> #ai-final-project) thead,
  .course-content-section:has(> #ai-lectures) thead,
  .course-content-section:has(> #ai-assignments) thead {
      display: none !important;
  }

    .course-content-section:has(> #ai-course-logistics) tbody,
  .course-content-section:has(> #ai-final-project) tbody,
  .course-content-section:has(> #ai-lectures) tbody,
  .course-content-section:has(> #ai-assignments) tbody {
      display: grid !important;
      gap: 7px;
  }

    .course-content-section:has(> #ai-course-logistics) tbody tr,
  .course-content-section:has(> #ai-final-project) tbody tr,
  .course-content-section:has(> #ai-lectures) tbody tr,
  .course-content-section:has(> #ai-assignments) tbody tr {
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #deded7;
      border-radius: 11px;
      box-shadow: 0 3px 11px rgba(0, 0, 0, 0.035);
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody tr:nth-child(even),

  .course-content-section:has(> #ai-final-project)
  tbody tr:nth-child(even),

  .course-content-section:has(> #ai-lectures)
  tbody tr:nth-child(even),

  .course-content-section:has(> #ai-assignments)
  tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content-section:has(> #ai-course-logistics) tbody td,
  .course-content-section:has(> #ai-final-project) tbody td,
  .course-content-section:has(> #ai-lectures) tbody td,
  .course-content-section:has(> #ai-assignments) tbody td {
      box-sizing: border-box !important;
      width: auto !important;
      min-width: 0 !important;
      padding: 8px 10px !important;
      background: transparent !important;
      border: 0 !important;
      font-size: 15px !important;
      line-height: 1.4 !important;
      text-align: left !important;
      white-space: normal !important;
      overflow-wrap: anywhere;
      word-break: normal !important;
  }
    /* =======================================================
     Course Logistics
     Assignment | Grade Weightage
     ======================================================= */

    .course-content-section:has(> #ai-course-logistics)
  tbody tr {
      display: grid !important;
      grid-template-columns: minmax(116px, 0.75fr)
      minmax(0, 1.65fr);
      align-items: stretch;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:first-child {
      display: flex !important;
      align-items: center;
      padding: 9px 10px !important;
      background: #292a08 !important;
      border-right: 1px solid rgba(255, 255, 255, 0.09) !important;
      color: #cfb97d;
      font-family: "Nunito Sans", "Nunito", sans-serif;
      font-weight: 700;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:nth-child(2) {
      display: flex !important;
      align-items: center;
      padding: 9px 11px !important;
  }
    /* =======================================================
     Final Project
     Component | Weight | Description
     ======================================================= */

    .course-content-section:has(> #ai-final-project)
  tbody tr {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) 66px;
      grid-template-areas: "component weight"
      "description description";
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(1) {
      grid-area: component;
      display: flex !important;
      align-items: center;
      padding: 9px 11px !important;
      color: #252600;
      font-weight: 700;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(2) {
      grid-area: weight;
      display: flex !important;
      align-items: center;
      justify-content: center;
      margin: 6px 7px 6px 0;
      padding: 5px 7px !important;
      background: #292a08 !important;
      border-radius: 8px;
      color: #cfb97d;
      font-weight: 700;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(3) {
      grid-area: description;
      padding: 8px 11px 10px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.075) !important;
  }
    /* =======================================================
     Lectures
     No. | Date | Topics | Slides | References
     ======================================================= */

    .course-content-section:has(> #ai-lectures)
  tbody tr {
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      grid-template-areas: "number date slides"
      "topic topic topic"
      "references references references";
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(1) {
      grid-area: number;
      display: flex !important;
      align-items: center;
      justify-content: center;
      color: #725f1d;
      font-weight: 700;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(2) {
      grid-area: date;
      display: flex !important;
      align-items: center;
      padding-left: 4px !important;
      color: #55564f;
      font-size: 14px !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(3) {
      grid-area: topic;
      padding: 9px 11px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      font-size: 16px !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(4) {
      grid-area: slides;
      display: flex !important;
      align-items: center;
      justify-content: center;
      padding: 5px 8px !important;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(4) a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 30px;
      padding: 5px 9px;
      background: #292a08;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 12px !important;
      line-height: 1 !important;
      text-decoration: none !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(5) {
      grid-area: references;
      padding: 8px 11px 10px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      font-size: 14px !important;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(5)::before {
      display: block;
      margin-bottom: 5px;
      color: #725f1d;
      content: "Reference materials";
      font-family: "Nunito Sans", "Nunito", sans-serif;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
  }

    .course-content-section:has(> #ai-lectures)
  tbody td:nth-child(5) a {
      display: inline;
      font-size: 14px !important;
  }
    /* =======================================================
     Assignments
     No. | Release | Due | Assignment | Link
     ======================================================= */

    .course-content-section:has(> #ai-assignments)
  tbody tr {
      display: flex !important;
      flex-wrap: wrap;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(1) {
      order: 1;
      flex: 0 0 44px;
      display: flex !important;
      align-items: center;
      justify-content: center;
      color: #725f1d;
      font-weight: 700;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(4) {
      order: 2;
      flex: 1 1 calc(100% - 44px);
      padding: 8px 10px !important;
      font-size: 16px !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2),

  .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3) {
      display: flex !important;
      align-items: center;
      gap: 7px;
      flex: 0 0 50%;
      padding: 6px 9px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      font-size: 14px !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2) {
      order: 3;
      border-right: 1px solid rgba(0, 0, 0, 0.07) !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3) {
      order: 4;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2)::before {
      color: #725f1d;
      content: "Release";
      font-size: 12px;
      font-weight: 800;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3)::before {
      color: #725f1d;
      content: "Due";
      font-size: 12px;
      font-weight: 800;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(5) {
      order: 5;
      flex: 0 0 100%;
      padding: 7px 10px !important;
      border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
      text-align: center !important;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(5) a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 31px;
      padding: 5px 11px;
      background: #292a08;
      border-radius: 7px;
      color: #cfb97d !important;
      font-size: 12px !important;
      text-decoration: none !important;
  }
}

/* Stack assignment dates on exceptionally narrow phones. */

@media (max-width: 360px) {

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2),

  .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(3) {
      flex-basis: 100%;
  }

    .course-content-section:has(> #ai-assignments)
  tbody td:nth-child(2) {
      border-right: 0 !important;
  }
}

/* =========================================================
   Refine AI Course Logistics and Final Project on mobile
   ========================================================= */

@media (max-width: 700px) {
    /* -------------------------------------------------------
     Course Logistics
     ------------------------------------------------------- */

    .course-content-section:has(> #ai-course-logistics)
  tbody {
      gap: 7px !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody tr {
      display: grid !important;
      grid-template-columns: 118px minmax(0, 1fr) !important;
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #deded7 !important;
      border-radius: 11px !important;
      box-shadow: none !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:first-child {
      display: flex !important;
      align-items: center;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 11px !important;
      background: #292a08 !important;
      border: 0 !important;
      color: #cfb97d !important;
      font-size: 14px !important;
      font-weight: 700 !important;
      line-height: 1.3 !important;
      overflow-wrap: normal !important;
      word-break: normal !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:first-child strong {
      color: inherit !important;
      font-size: inherit !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:nth-child(2) {
      display: block !important;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 12px !important;
      background: transparent !important;
      border: 0 !important;
      color: #44443e !important;
      font-size: 15px !important;
      line-height: 1.4 !important;
      text-align: left !important;
      overflow-wrap: normal !important;
      word-break: normal !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody td:nth-child(2) strong {
      display: inline !important;
      width: auto !important;
      color: #1f2107 !important;
      font-size: inherit !important;
      line-height: inherit !important;
      white-space: normal !important;
      overflow-wrap: normal !important;
      word-break: normal !important;
  }
    /* * Collaboration rules contain considerably more text,
   * so give that row a full-width label and content area. */

    .course-content-section:has(> #ai-course-logistics)
  tbody tr:last-child {
      grid-template-columns: 1fr !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody tr:last-child td:first-child {
      min-height: 38px;
      border-radius: 0 !important;
  }

    .course-content-section:has(> #ai-course-logistics)
  tbody tr:last-child td:nth-child(2) {
      padding: 11px 12px 12px !important;
  }
    /* -------------------------------------------------------
     Final Project
     ------------------------------------------------------- */

    .course-content-section:has(> #ai-final-project)
  tbody {
      gap: 7px !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody tr {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      grid-template-areas: "component weight"
      "description description" !important;
      overflow: hidden;
      background: #ffffff !important;
      border: 1px solid #deded7 !important;
      border-radius: 11px !important;
      box-shadow: none !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody tr:nth-child(even) {
      background: #f5f2df !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(1) {
      grid-area: component;
      display: flex !important;
      align-items: center;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 11px !important;
      background: transparent !important;
      border: 0 !important;
      color: #222306 !important;
      font-size: 15px !important;
      font-weight: 700 !important;
      line-height: 1.35 !important;
      text-align: left !important;
      overflow-wrap: normal !important;
      word-break: normal !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(1) strong {
      color: inherit !important;
      font-size: inherit !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(2) {
      grid-area: weight;
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      align-self: center;
      width: auto !important;
      min-width: 58px !important;
      min-height: 32px;
      margin: 6px 7px 6px 4px !important;
      padding: 5px 9px !important;
      background: #292a08 !important;
      border: 0 !important;
      border-radius: 8px !important;
      color: #cfb97d !important;
      font-size: 14px !important;
      font-weight: 700 !important;
      line-height: 1 !important;
      text-align: center !important;
      white-space: nowrap !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(2) strong {
      color: inherit !important;
      font-size: inherit !important;
  }

    .course-content-section:has(> #ai-final-project)
  tbody td:nth-child(3) {
      grid-area: description;
      width: auto !important;
      min-width: 0 !important;
      padding: 9px 11px 11px !important;
      background: transparent !important;
      border: 0 !important;
      border-top: 1px solid rgba(0, 0, 0, 0.075) !important;
      color: #505049 !important;
      font-size: 15px !important;
      line-height: 1.4 !important;
      text-align: left !important;
      overflow-wrap: normal !important;
      word-break: normal !important;
  }
}

/* =========================================================
   AI Assignments table — desktop column layout
   ========================================================= */

@media (min-width: 701px) {
  .course-content-section:has(> #ai-assignments) table {
    display: table !important;

    width: 100% !important;
    min-width: 0 !important;

    table-layout: fixed !important;
  }

  /* No. */

  .course-content-section:has(> #ai-assignments)
  table th:nth-child(1),
  .course-content-section:has(> #ai-assignments)
  table td:nth-child(1) {
    width: 7% !important;
  }

  /* Release Date */

  .course-content-section:has(> #ai-assignments)
  table th:nth-child(2),
  .course-content-section:has(> #ai-assignments)
  table td:nth-child(2) {
    width: 15% !important;
  }

  /* Due Date */

  .course-content-section:has(> #ai-assignments)
  table th:nth-child(3),
  .course-content-section:has(> #ai-assignments)
  table td:nth-child(3) {
    width: 15% !important;
  }

  /* Assignment */

  .course-content-section:has(> #ai-assignments)
  table th:nth-child(4),
  .course-content-section:has(> #ai-assignments)
  table td:nth-child(4) {
    width: 43% !important;

    padding-right: 18px !important;
    padding-left: 18px !important;

    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Link */

  .course-content-section:has(> #ai-assignments)
  table th:nth-child(5),
  .course-content-section:has(> #ai-assignments)
  table td:nth-child(5) {
    width: 20% !important;

    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .course-content-section:has(> #ai-assignments)
  table th,
  .course-content-section:has(> #ai-assignments)
  table td {
    vertical-align: middle !important;
  }
}

/* Disable automatic hyphenation on all course pages */

.course-page,
.course-page p,
.course-page li,
.course-page dt,
.course-page dd,
.course-page th,
.course-page td,
.course-page h1,
.course-page h2,
.course-page h3,
.course-page h4,
.course-page a,
.course-page span {
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  hyphens: none !important;

  overflow-wrap: normal;
  word-break: normal;
}