body {
  background-color: #e6f3ff;
  color: #222;
  font-family: "Times New Roman", Times, serif;
}

h1,
h2,
h3,
h4 {
  font-family: optima, arial, helvetica, sans-serif;
  font-weight: bold;
}

h2 {
  font-size: 1.4em;
  margin-top: 1.6em;
}

h3 {
  font-size: 1.2em;
}

h4 {
  font-size: 1.05em;
}

code,
kbd,
pre,
samp {
  font-family: "Inconsolata", "Courier New", Courier, monospace;
}

::selection {
  background: #fff200;
}

a,
a:link,
a:visited,
a:active {
  color: #0072c1;
  text-decoration: none;
}

a:hover {
  color: #0085e1;
  text-decoration: underline;
}

blockquote {
  background-color: #ffffff;
  border-left: 4px solid #0072c1;
  padding: 0.6rem 1rem;
}

#title-block-header {
  display: none;
}

.header-table {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.header-main h1 {
  font: bold 1.8em optima, arial, helvetica, sans-serif;
  margin: 0 0 0.35rem 0;
}

.header-main p {
  margin: 0.3rem 0;
}

.header-img img {
  border: 3px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.schedule-title {
  text-align: center;
  font-weight: bold;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.3rem;
  margin: 1.5rem 0 0.5rem 0;
}

.page-head h1 {
  font: bold 1.8em optima, arial, helvetica, sans-serif;
  margin: 0.5rem 0 0.15rem 0;
}

.page-head p {
  color: #47505c;
  margin: 0 0 1.2rem 0;
}

.page-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.2rem 0;
}

.big-link {
  display: inline-block;
  padding: 0.55em 1.3em;
  background-color: #0072c1;
  color: #ffffff;
  border-radius: 0.5em;
  font-weight: bold;
  font-family: optima, arial, helvetica, sans-serif;
}

.big-link:hover {
  background-color: #005ea3;
  color: #ffffff;
  text-decoration: none;
}

.table {
  border: none;
  margin-top: 0.5rem;
}

.table thead th {
  color: #0072c1;
  text-align: center;
  border: none;
  vertical-align: middle;
  font-weight: bold;
}

.table td {
  border: 1px solid #ffffff;
  padding: 6px;
  vertical-align: middle;
  font-size: 0.95rem;
}

.table tbody td {
  background-color: #c1d6e3;
}

.table tbody tr.week-even td[rowspan] {
  background-color: #b0c4de;
}

.table tbody tr:hover td {
  background-color: #b0c4de;
}

/* Recitation / announcement row: warm colour to stand out from the blue weeks */
.table tbody tr.recitation-row td {
  background-color: #ffe0cc;
  color: #c2410c;
  font-weight: 600;
}

.table tbody tr.recitation-row:hover td {
  background-color: #ffd0ad;
}

.table a {
  display: inline-block;
  padding: 0.22em 0.6em;
  margin: 0.15em 0.2em 0.15em 0;
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.3;
  color: #0072c1;
  background-color: transparent;
  border: 1px solid #0072c1;
  border-radius: 0.4em;
  white-space: nowrap;
}

.table a:hover,
.table a:focus {
  background-color: #0072c1;
  color: #ffffff;
  text-decoration: none;
}

.announcements {
  list-style: none;
  padding-left: 0;
  margin: 1.2rem 0;
}

.announcements li {
  margin-bottom: 0.7rem;
  padding: 0.7rem 1rem;
  background-color: #ffffff;
  border: 1px solid #b0c4de;
  border-radius: 12px;
}

.announcements .date {
  font-weight: 600;
  color: #0072c1;
  margin-right: 0.6rem;
}

.announcements-fold {
  margin: 1.2rem 0;
}

.announcements-fold > summary {
  display: inline-block;
  cursor: pointer;
  color: #0072c1;
  font-weight: 600;
  list-style: none;
  user-select: none;
}

.announcements-fold > summary::-webkit-details-marker {
  display: none;
}

.announcements-fold > summary:hover {
  text-decoration: underline;
}

.announcements-fold > summary::before {
  content: "▸ ";
}

.announcements-fold[open] > summary::before {
  content: "▾ ";
}

.announcements-fold .announcements {
  margin: 0.8rem 0 0;
}

#quarto-content {
  max-width: 1140px;
  margin: 0 auto;
}

#quarto-content:not(:has(nav#TOC)) {
  grid-template-columns: minmax(0, 1fr) !important;
}

#quarto-content:not(:has(nav#TOC))>* {
  grid-column: 1 / -1 !important;
}

#quarto-content:has(nav#TOC) {
  grid-template-columns: minmax(0, 1fr) 250px !important;
  column-gap: 2rem;
}

#quarto-content:has(nav#TOC) #quarto-document-content {
  grid-column: 1;
}

#quarto-content:has(nav#TOC) #quarto-margin-sidebar {
  grid-column: 2;
  grid-row: 1 / -1;
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

/* 手机/平板：TOC 侧栏不再占列，正文恢复全宽，避免文字被挤窄 */
@media (max-width: 991.98px) {
  #quarto-content:has(nav#TOC) {
    grid-template-columns: minmax(0, 1fr) !important;
    column-gap: 0 !important;
  }

  #quarto-content:has(nav#TOC) #quarto-margin-sidebar {
    display: none !important;
  }
}

/* 手机：内容区留出左右边距，文字不再贴屏幕边缘 */
@media (max-width: 575.98px) {
  #quarto-content {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

.pagefoot {
  text-align: right;
  font-size: 0.85em;
  color: #47505c;
  margin-top: 1.5rem;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: #ffffff !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #ffffff !important;
  text-decoration: none !important;
  border-bottom: none !important;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 0.4em;
}

.navbar .nav-link.active {
  color: #ffffff !important;
  text-decoration: none !important;
  border-bottom: none !important;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 0.4em;
}

.navbar .navbar-logo {
  max-height: 2.4rem;
  width: auto;
  border-radius: 0.3rem;
  transition: opacity 0.2s ease;
}

.navbar .navbar-brand-svg {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

/* Hide the Quarto-generated brand text (replaced by inline SVG lockup via wenlab-brand.html) */
#quarto-header .navbar-brand .navbar-title {
  display: none !important;
}

.navbar .navbar-brand-svg svg {
  height: 2rem;
  width: auto;
  display: block;
  color: #ffffff;
  transition: opacity 0.2s ease;
}

.navbar .navbar-brand-svg:hover svg,
.navbar .navbar-brand-svg:focus svg {
  opacity: 0.65;
}

.navbar .navbar-brand:hover .navbar-logo,
.navbar .navbar-brand:focus .navbar-logo {
  opacity: 0.65;
}

.navbar .navbar-brand {
  font-weight: bold;
  text-decoration: none !important;
}

.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus {
  text-decoration: none !important;
}

#quarto-header>nav {
  padding-left: 0;
  padding-right: 0;
}

.navbar .navbar-container {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.navbar .navbar-container>.navbar-brand-container {
  margin-right: auto !important;
  margin-left: calc(1.5rem - (100vw - 1140px) * 0.5) !important;
}

.navbar .navbar-nav {
  margin-left: auto !important;
  margin-right: 0 !important;
}

.navbar .nav-link {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

@media (max-width: 1199.98px) {
  .navbar .navbar-container>.navbar-brand-container {
    margin-left: 0 !important;
  }
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 991.98px) {
  .header-table {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-img img {
    height: 80px !important;
  }

  .table-responsive .table {
    width: auto;
    min-width: 100%;
    max-width: none;
  }
}

@media (max-width: 575.98px) {

  .table th:nth-child(6),
  .table td:nth-child(6) {
    display: none;
  }

  .table a {
    white-space: normal;
    font-size: 0.75em;
  }

  .table {
    font-size: 0.85em;
  }
}

.table .due {
  display: inline-block;
  background-color: #666;
  color: #ffffff;
  border-radius: 10px;
  padding: 3px 7px;
  font-size: 0.75rem;
  font-weight: normal;
  line-height: 1.2;
  vertical-align: middle;
  margin-left: 0.3em;
}


.contact-label {
  margin-bottom: 0.1rem !important;
}

.contact-list {
  list-style: none;
  padding-left: 2em;
  margin: 0 0 0.6rem 0;
}

.contact-list li {
  margin-bottom: 0.1rem;
}