/* Math 119 Quarto Site Styles */

details {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: var(--bs-secondary-bg, #f8f9fa);
  color: var(--bs-body-color, #212529);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--bs-body-color, #495057);
  padding: 0.25rem 0;
}

details[open] summary {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/* Dark mode override: darkly's --bs-secondary-bg stays light (#ebebeb),
   so scope explicitly to Quarto's dark-mode body class. */
body.quarto-dark details {
  background: #2b2b2b;
  border-color: #444;
  color: #dee2e6;
}

body.quarto-dark details summary {
  color: #dee2e6;
}

body.quarto-dark details[open] summary {
  border-bottom-color: #444;
}

.indent {
  margin-left: 2em;
}

ol[type="a"] {
  list-style-type: lower-alpha;
}

/* Prevent wide tables from breaking layout — scroll horizontally */
table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

table td, table th {
  border: 1px solid #dee2e6 !important;
  white-space: normal;
  word-wrap: break-word;
  min-width: 120px;
}

table td:first-child, table th:first-child {
  min-width: 3rem;
  white-space: nowrap;
}

/* Left-align display math (MathJax centered by default looks odd in lists) */
mjx-container[display="true"] {
  text-align: left !important;
  margin-left: 0 !important;
}

/* Schedule grid: equal column widths */
.schedule-grid table {
  display: table !important;
  table-layout: fixed;
  width: 100%;
  overflow-x: auto;
}

.schedule-grid table th,
.schedule-grid table td {
  min-width: unset;
  vertical-align: top;
  overflow-wrap: break-word;
}

/* Keep Quarto's prev/next page-navigation (footer buttons) but hide the
   class-list sidebar it derives ordering from. The sidebar contents in
   _quarto.yml still define the prev/next sequence; we just don't render
   the list. Content reflows to the normal centered article width. */
#quarto-sidebar {
  display: none !important;
}
.quarto-sidebar-toggle {
  display: none !important;
}
