:root {
  --bs-nav-link-font-weight: bold;
  --st-news-card-bg-color: #f3dbff;
  --bs-list-group-active-border-color: #93c0f1;
  --st-table-border-radius: 0.3rem;

  /* Masthead */
  --st-blue: #00274c;
  --st-blue-mid: #0a3a68;
  --st-blue-tint: #e7eff7;
  --st-maize: #ffcb05;
  --st-maize-tint: #fff1c2;
  --st-lime: #f3fed6;

  /* Accents, carried over from the theme's Material palette */
  --st-purple: #9c27b0;
  --st-purple-deep: #6a1b7a;
  --st-gray-tint: #f1f3f5;
  --st-teal: #18bc9c;
  --st-teal-tint: #b6e8dc;
  --st-amber: #f1cb82;
  --st-mint: #e2f1e9;
  --st-sky: #448aff;
  --st-sky-tint: #eaf2ff;
  --st-sky-rule: #c8ddff;

  --st-ink: #17202a;
  --st-ink-muted: #4a5560;
  --st-rule: #dde3ea;
  --st-rule-strong: #b9c4cf;
  --st-surface: #f2f5f8;
  --st-link: #1976d2;
  --st-danger: #d32f2f;

  --st-nav-height: 140px;
}

/* Below lg the masthead collapses behind the toggler, so it needs less room. */
@media (max-width: 991.98px) {
  :root {
    --st-nav-height: 64px;
  }
}
html {
  scroll-padding-top: calc(var(--st-nav-height) + 1.5rem);
}
*, *::before, *::after {
  box-sizing: border-box;
}
:focus-visible {
  outline: 2px solid var(--st-link);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.navbar .nav-link {
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.navbar-nav .nav-item:hover .nav-link {
  color: var(--st-lime);
  border-bottom-color: var(--st-lime);
}
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--st-maize);
  border-bottom-color: var(--st-maize);
}
.border-table {
  position: relative;
  /* No outline: a 1px light border left a pale rim around the navy header. */
  border: 0;
  border-radius: var(--st-table-border-radius);
  box-shadow: 0 1px 2px rgba(0, 39, 76, .10), 0 4px 14px rgba(0, 39, 76, .10);
  background-color: #fff;
  /* clip, not hidden: no scroll container, so the sticky header still sticks */
  overflow: clip;
}
.round-corner-table {
  border-radius: var(--st-table-border-radius);
}
/* The wrapper clips to its own radius, so rounding the header cells too only
   pulled their corners inside the clip and exposed the card behind them. */
.round-corner-table>*>thead th:first-child,
.round-corner-table>*>thead th:last-child {
  border-radius: 0;
}
.banner-head {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  display: block;
  padding: 15px 20px;
  font-weight: 700;
  color: #fff;
  background-color: #1b6ec1;
}
.banner-bg {
  background-color: var(--st-blue);
  border-bottom: 3px solid var(--st-maize);
  box-shadow: 0 1px 10px rgba(0, 39, 76, .2);
}
.navbar-title-main {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--st-lime);
  letter-spacing: -0.01em;
  padding-left: var(--bs-navbar-nav-link-padding-x);
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
/* Put the term label on the course title's baseline. */
.navbar-nav:has(> .navbar-title-main) {
  align-items: baseline;
}
.navbar-title-sub {
  font-weight: bold;
  color: var(--st-maize);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.bs-docs-navbar-masthead {
	top: 62px;
}
.md-badge {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: baseline;
}
.badge.fs-6 {
  font-size: 0.78rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: baseline;
}
.badge.rounded-pill {
  box-shadow: none;
}
.navbar {
  font-size: 17px;
  padding-top: 0.5rem;
  padding-bottom: 0.2rem;
}
.navbar-masthead {
	min-height: 44px;
  margin-bottom: 18px;
}
.navbar-custom {
  background-color: #0275d8;
}
.navbar-custom .navbar-nav .nav-link {
  color: rgba(255,255,255,.5);
}
.navbar-custom .navbar-nav .active > .nav-link, .navbar-custom .navbar-nav .nav-link.active, .navbar-custom .navbar-nav .nav-link.open, .navbar-custom .navbar-nav .open>.nav-link {
  color: #fff;
}
.navbar-custom .navbar-nav > li > a:hover {
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
  background-color: #0088cc;
}
.navbar-custom .navbar-nav > .active > a:hover {
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
  background-color: #0088cc;
}
.navbar-inner {
  padding-top: 10px;
  min-height: 60px;
}
.funpar {
  font-size: 18px;
}
.funterm {
  font-style: italic;
  color: #c09853;
}
.funcomment {
}
.funcomment .popover {
  position: relative;
  display: block;
  width: 460px;
  margin: 20px;
}
.funcomm-head {
  font-size: 16px;
  font-weight: bold;
  background-color: #f7f7f7;
}
.funcomm-head a:link {color:#474bb8;}
.funcomm-head a:visited {color:gray;}  /* visited link */
.funcomm-head a:hover {color:blue;}  /* mouse over link */
.funcomm-content {
  font-size: 14px;
  background-color: #e0e0bb;
}
body {
  padding-top: var(--st-nav-height);
  padding-bottom: 0;
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--st-ink);
}

/* --- Prose rhythm ---------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  color: var(--st-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.7rem;
  margin: 2.4rem 0 0.9rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--st-maize);
}
h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.7rem;
}
h4 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
/* A heading right after another needs no full section gap. */
h2 + h3, h3 + h4 {
  margin-top: 1rem;
}
.body-content > *:first-child {
  margin-top: 0;
}
p {
  margin-bottom: 1rem;
}
a {
  color: var(--st-link);
  text-underline-offset: 2px;
}
a:hover {
  color: #0d47a1;
  text-decoration-color: var(--st-maize);
  text-decoration-thickness: 2px;
}
hr {
  border: 0;
  height: 1px;
  background-color: var(--st-rule);
  opacity: 1;
  margin: 2.5rem 0;
}
code {
  background-color: #f6eefa;
  color: var(--st-purple-deep);
  padding: 0.12em 0.35em;
  border-radius: 3px;
}
blockquote {
  margin: 1.5rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--st-maize);
  color: var(--st-ink-muted);
}
/*
a {
  color: #18bc9c;
}
*/
.table {
  font-size: 0.95rem;
  margin-bottom: 0rem;
  color: var(--st-ink);
  --bs-table-hover-bg: #f7f9fb;
  --bs-border-color: var(--st-rule);
}
.table > :not(caption) > * > * {
  padding: 0.7rem 0.85rem;
}
#schedule-table a {
  text-decoration: none;
  font-weight: 600;
}
th {
  font-weight: bold;
}

/* Course milestones: a warm band that reads as "something is due". */
.table>thead>tr>td.info, .table>tbody>tr>td.info, .table>tfoot>tr>td.info, .table>thead>tr>th.info, .table>tbody>tr>th.info, .table>tfoot>tr>th.info, .table>thead>tr.info>td, .table>tbody>tr.info>td, .table>tfoot>tr.info>td, .table>thead>tr.info>th, .table>tbody>tr.info>th, .table>tfoot>tr.info>th {
    background-color: var(--st-maize-tint);
    color: #4a3308;
}
/* Non-meeting days read as a break in the rhythm. */
.table>thead>tr>td.success, .table>tbody>tr>td.success, .table>tfoot>tr>td.success, .table>thead>tr>th.success, .table>tbody>tr>th.success, .table>tfoot>tr>th.success, .table>thead>tr.success>td, .table>tbody>tr.success>td, .table>tfoot>tr.success>td, .table>thead>tr.success>th, .table>tbody>tr.success>th, .table>tfoot>tr.success>th {
    background-color: var(--st-teal-tint);
    color: #0d3a30;
}

.thead-dark>tr>th{
  background-color: var(--st-blue);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 0;
  box-shadow: inset 0 -3px 0 var(--st-maize);
}

.policy dt {
  width: 100px;
  text-align: left;
}
.policy  dd {
  margin-left: 110px;
}
.container-fluid {
  padding-left: 0;
}
.sidebar-nav {
  padding: 9px 0;
}
.bs-docs-sidenav.affix {
  top: 60px;
}
.body-content {
  margin-top: 30px;
}
.section {
  margin-bottom: 25px;
}
.sec-header {
  padding: 5px;
  background-color: var(--st-mint);
  margin-top: 20px;
  margin-bottom: 20px;
}
.section > p, .section > ul, .section > ol {
  padding-left: 15px;
}
ul, ol {
  padding-left: 1.45rem;
}
li {
  margin-bottom: 0.35rem;
}
li > ul, li > ol {
  margin-top: 0.35rem;
}
ul li::marker {
  color: var(--st-purple);
}
.section > pre {
  margin-left: 15px;
}
.news-bg-color {
  background-color: var(--st-news-card-bg-color);
}
.news-card {
  background-color: #fff;
  border: 1px solid #cfd8e2;
  border-radius: 0.4rem;
  box-shadow: 0 1px 2px rgba(0, 39, 76, .08), 0 6px 18px rgba(0, 39, 76, .10);
  overflow: hidden;
}
.news-card .card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--st-blue);
  border-bottom: 0;
  padding: 0.6rem 0.95rem;
}
.news-card .card-header:before {
  font-family: 'bootstrap-icons';
  font-size: 0.9rem;
  font-weight: normal;
  letter-spacing: 0;
  color: var(--st-maize);
  content: "\f483";
}
.news-card .card-body {
  padding: 0.2rem 0.95rem 0.35rem;
}
/* Whole announcements set in bold left nothing to emphasise. */
.news-card li {
  color: var(--st-ink);
  font-weight: normal;
  font-size: 0.93rem;
  line-height: 1.55;
}
/* Flex row so a wrapped announcement hangs off the date rather than under it. */
.news-card .list-group-item {
  display: flex;
  gap: 0.5rem;
  background-color: transparent;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e6ebf1;
}
.news-card .list-group-item:last-child {
  border-bottom: 0;
}
/* The date is the scanning handle: set it apart from the announcement text. */
.news-date {
  flex: none;
  align-self: flex-start;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background-color: var(--st-maize-tint);
  color: var(--st-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  vertical-align: 0.05em;
}
.news-card a {
  color: var(--st-link);
  font-weight: 600;
}
.news-card a:hover {
  color: #0d47a1;
  text-decoration-color: var(--st-maize);
}
.news {
  padding: 10px;
  padding-left: 2em;
  background-color: #fef4e9;
  border: 1px solid maroon;
  margin-top: 10px;
  margin-bottom: 20px;
}
.news h3 {
  margin-bottom: 20px;
}
.news dt {
  color: #000055;
  font-weight: bold;
  margin-bottom: 0.3em;
}
.news dd {
  padding-bottom: 1em;
  margin-bottom: 0;
  margin-left: 1em;
  padding-left: 0;
  margin-right: 1em;
}
.news li {
  margin-bottom:10px;
}
.news li .date {
  color: #888;
  font-size: 12px;
}
.staff dd {
  margin-left: 2em;
}
.source-listing dd {
  margin-left: 3em;
}
.syllabus-week {
  vertical-align: top !important;
  font-weight: bold;
  font-size: 0.9rem;
  text-align: center;
  color: var(--st-ink);
}
/* Bootstrap paints every cell with .table > * > * > *, so out-specify it. The
   maize rail is painted inside the cell: a real border would widen the
   collapsed table's left edge and leave a strip beside the header row. */
.table > tbody > tr > td.syllabus-week {
  background-color: var(--st-gray-tint);
  background-image: linear-gradient(to right, var(--st-maize) 3px, transparent 3px);
}

/* Hover paints an inset fill over every cell; let the tinted ones keep theirs. */
.table > tbody > tr:hover > td.info,
.table > tbody > tr:hover > td.success,
.table > tbody > tr:hover > td.syllabus-week {
  box-shadow: none;
}

.table-fit {
  width: 1px;
}
.grading-table {
  border-radius: var(--st-table-border-radius);
  border-left: 0;
  border-right: 0;
  overflow: hidden;
}
.grading-table .list-group-item {
  border-color: var(--st-rule);
  border-left: 0;
  border-right: 0;
  padding: 0.6rem 1rem;
}
.grading-table .list-group-item:first-child { border-top: 0; }
.grading-table .list-group-item:last-child { border-bottom: 0; }
.grading-table .badge {
  min-width: 3.4rem;
  padding: 0.35em 0.7em;
}

/* --- Callout cards: one geometry, three voices --------------------- */
.card[class*="border-"] {
  border-width: 1px;
  border-left-width: 3px;
  border-radius: 0.25rem;
  margin: 1.4rem 0;
}
.card[class*="border-"] > .card-header {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
}
.card.border-danger > .card-header {
  background-color: #fdeceb !important;
  color: #c62828 !important;
  border-bottom-color: #f5c6c2;
}
.card.border-success > .card-header {
  background-color: #e6f4ea !important;
  color: #2e7d32 !important;
  border-bottom-color: #c3e2c8;
}
.card.border-info > .card-header {
  background-color: #f6e8fb !important;
  color: var(--st-purple-deep) !important;
  border-bottom-color: #e2c4ec;
}
/* Bootstrap's .border-* utilities are !important, so these tints must be too. */
.card.border-success {
  border-color: #c3e2c8 !important;
  border-left-color: #4caf50 !important;
}
.card.border-info {
  border-color: #e2c4ec !important;
  border-left-color: var(--st-purple) !important;
}
.card.border-danger {
  border-color: #f5c6c2 !important;
  border-left-color: #e51c23 !important;
}
.card[class*="border-"] > .card-body {
  padding: 1rem 1.15rem 0.4rem;
  font-size: 0.95rem;
}
.card[class*="border-"] > .card-body > *:last-child {
  margin-bottom: 0.6rem;
}

/* Keep the theme's blue on these lists; markers should follow the text. */
ul.text-primary li::marker, ol.text-primary li::marker {
  color: inherit;
}

.site-footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--st-ink-muted);
}
.site-footer hr {
  margin: 0 0 0.9rem;
}
.site-footer .wrapper {
  padding-bottom: 1.6rem;
}
/*
.table-bordered {
  border:1px solid gray
}
.table-bordered > thead > tr >th, .table-bordered > tbody > tr >th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
  border:1px solid gray
}
*/
#schedule-table td:nth-child(3) {
  font-weight: bold;
  color: var(--st-ink);
}
#schedule-table > tbody > tr > td {
  vertical-align: top;
  border-top: 1px solid var(--st-rule);
  border-bottom: 0;
}
/* Each week opens with the rowspan cell; give that boundary more weight. */
#schedule-table > tbody > tr:has(.syllabus-week) > td {
  border-top: 2px solid var(--st-rule-strong);
}
#schedule-table > tbody > tr:first-child > td {
  border-top: 0;
}
/* Column headers stay legible through fifteen weeks of scrolling. */
#schedule-table > thead th {
  position: sticky;
  top: calc(var(--st-nav-height) - 1px);
  z-index: 3;
}
#schedule-table > tbody > tr > td:nth-child(2),
#schedule-table > tbody > tr > td:nth-child(1):not(.syllabus-week) + td {
  white-space: nowrap;
  color: var(--st-ink-muted);
}
#schedule-table > tbody > tr > td:nth-child(5),
#schedule-table > tbody > tr > td:nth-child(6) {
  font-size: 0.9rem;
  color: var(--st-ink-muted);
}
#schedule-table td > ol {
  padding-left: 1.4rem;
  margin-bottom: 0.5rem;
}
#schedule-table td > ol > li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
#schedule-table td > *:last-child {
  margin-bottom: 0;
}
.paper-question {
  background-color: #ddd5fe;
}
/* Optional reading: compact, but still flagged in the theme's blue. */
details {
    position: relative;
    margin: 0.9em 0 0.5em;
    padding: 0 1rem;
    border: 1px solid var(--st-sky-rule);
    border-left: 0.2rem solid var(--st-sky);
    border-radius: 0.2rem;
    background-color: #fff;
    overflow: auto;
    padding-top: 0;
    display: block;
}
details > summary {
    margin: 0 -1rem;
    padding: 0.35rem 2rem 0.35rem 2.4rem;
    border-bottom: 0.05rem solid transparent;
    background-color: var(--st-sky-tint);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1b5eb8;
    cursor: pointer;
    list-style-type: none;
    transition: color 0.15s ease;
}
details > summary:hover {
    color: #0d47a1;
}
details[open] > summary {
    border-bottom-color: var(--st-sky-rule);
}
details > ul, details > ol {
    font-size: 0.9rem;
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}
details li {
    color: var(--st-ink);
}
details > summary::-webkit-details-marker {
    display: none;
}
details > summary:before {
    position: absolute;
    left: 0.75rem;
    color: var(--st-sky);
    font-size: 0.9rem;
    font-family: 'bootstrap-icons';
    content: "\F4C9";
}
.details-reading > summary:before {
    content: "\F193";
}
details > summary:after {
    position: absolute;
    top: 0.35rem;
    right: 0.7rem;
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.85rem;
    content: "\F229";
    font-family: 'bootstrap-icons';
    transition: transform 0.18s ease;
}
details[open] > summary:after {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}
details p {
  margin: 1em 0 0.4em;
}
