/* UA-specific styles */

/* Set background color for all slides with grid pattern */
.reveal .slides section,
.reveal .slide-background {
  background-color: #F6F5EF !important;
  background-image: 
    linear-gradient(rgba(200, 200, 200, 0.20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 200, 200, 0.20) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: 0 0, 0 0;
}

/* Slide figures: same cream as slide behind the image (transparent PNG regions only).
   No blend mode: multiply/screen darkened or shifted colors vs #F6F5EF. */
.reveal .slides section img:not(.full-slide):not(.no-slide-bg) {
  background-color: #F6F5EF;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Reduce slide height */
.reveal .slides section {
  max-height: 80vh;
  overflow-y: auto;
}

.ua-block {
  background-color: transparent;
  border-left: 5px solid #9E1B34;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  font-size: 0.95em;
}

.title-slide {
  background-color: #F6F5EF !important;
  color: #9E1B34 !important;
  text-align: center;
  padding: 0px;
}

.reveal .slide-logo {
  display: block;
  position: fixed;
}

.logo-container {
  margin-bottom: 30px;
  text-align: center;
}

.logo-container img {
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
}

.title-slide h1,
.title-slide h2,
.title-slide h3,
.title-slide h4 {
  color: #9E1B34 !important;
  font-size: 2.5em;
}

.section-slide {
  background-color: #F6F5EF !important;
  color: #9E1B34 !important;
}

.section-slide h1 {
  color: #9E1B34 !important;
  font-size: 2em;
  margin-bottom: 30px;
}

.toc {
  list-style-type: none;
  padding: 0;
  margin: 0;
  background-color: #F6F5EF;
}

.toc li {
  margin: 15px 0;
  font-size: 1.2em;
  color: #9E1B34;
}

.toc li a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.toc li a:hover {
  color: #7B1528;
}

.toc li strong {
  color: #9E1B34;
  font-size: 1.1em;
  text-decoration: underline;
}

.reveal .footer,
.reveal .footer-default,
.reveal .footer * {
  color: #9E1B34 !important;
  font-size: 0.9em;
}

.reveal .progress {
  color: #9E1B34;
}

.reveal .controls {
  color: #9E1B34;
}

.reveal .slide-number {
  color: #9E1B34;
  font-size: 0.75em;
}

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4 {
  color: #9E1B34 !important;
  font-size: 1.5em;
}

/* Add line below slide titles */
.reveal h2::after {
  content: "";
  display: block;
  height: 2px;
  width: 1000px;
  margin-top: 10px;
  margin-bottom: 15px;
  background-color: #9E1B34;
}

/* Ensure h3 is crimson red */
.reveal .slide h3 {
  color: #9E1B34 !important;
}

.reveal a {
  color: #9E1B34;
  font-size: 1em;
}

.reveal a:hover {
  color: #7B1528;
}

.reveal code {
  color: #9E1B34;
  background-color: transparent;
  font-size: 0.9em;
}

.reveal pre {
  background-color: transparent;
  border: 1px solid #9E1B34;
  font-size: 0.9em;
}

/* Add smaller text for slide content */
.reveal p, 
.reveal li, 
.reveal div {
  font-size: 0.85em;
}

.reveal .slide-background-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-color: #9E1B34;
} 


/* Hide empty h2 headers */
h2:empty {
display: none;
} 

/* Add line below slide titles */
.reveal h3::after {
  content: "";
  display: block;
  height: 2px;
  width: 1000px;
  margin-top: 10px;
  margin-bottom: 15px;
  background-color: #9E1B34;
}

/* Content styling classes */
.red {
color: #9E1B34;
font-weight: bold;
}

.blue {
color: #4a90e2;
font-weight: bold;
}

.gray {
color: #7f8c8d;
}

/* Border box classes */
.red-border {
border: 2px solid #9E1B34;
border-radius: 8px;
padding: 15px;
background-color: #f8f9fa;
margin: 10px 0;
}

.blue-border {
border: 2px solid #4a90e2;
border-radius: 8px;
padding: 15px;
background-color: #f0f8ff;
margin: 10px 0;
}

.gray-border {
border: 2px solid #7f8c8d;
border-radius: 8px;
padding: 15px;
background-color: #f5f5f5;
margin: 10px 0;
}

/* Alert box class */
.blue-alert {
border: 2px solid #4a90e2;
border-radius: 8px;
padding: 15px;
background-color: #e6f3ff;
margin: 10px 0;
font-weight: bold;
}

/* Bullet point styling */
.red-bullets {
list-style-type: none;
padding-left: 0;
}

.red-bullets li {
position: relative;
padding-left: 20px;
margin: 8px 0;
}

.red-bullets li::before {
content: "•";
color: #9E1B34;
font-weight: bold;
position: absolute;
left: 0;
}

/* Full slide image */
.reveal .slides section:has(img.full-slide) {
  position: relative;
  padding: 0;
  margin: 0;
  max-height: 100vh !important;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-image: none !important;
}

.reveal .slides section:has(img.full-slide) h3 {
  position: relative;
  z-index: 10;
  background-color: transparent;
  padding: 15px 20px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.reveal .slides section img.full-slide {
  width: 100%;
  flex: 1;
  object-fit: cover;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

/* Math-themed styling */
.reveal .slides section .MathJax,
.reveal .slides section .math {
  font-size: 1.1em;
}

/* Sigmoid / row-average matrix slides: slightly boosted math in left column only */
.reveal .slides section .sigmoid-matrix-left .MathJax,
.reveal .slides section .sigmoid-matrix-left .MathJax_Display,
.reveal .slides section .sigmoid-matrix-left .MathJax_SVG,
.reveal .slides section .sigmoid-matrix-left .MathJax_SVG_Display,
.reveal .slides section .average-matrix-left .MathJax,
.reveal .slides section .average-matrix-left .MathJax_Display,
.reveal .slides section .average-matrix-left .MathJax_SVG,
.reveal .slides section .average-matrix-left .MathJax_SVG_Display {
  font-size: 1.04em !important;
}

/* Slide 9 (Jacobian intro): keep math slightly smaller — do not enlarge with slides 10–12 */
.reveal .slides section.math-compact-slide-tight .MathJax,
.reveal .slides section.math-compact-slide-tight .MathJax_Display,
.reveal .slides section.math-compact-slide-tight .MathJax_SVG,
.reveal .slides section.math-compact-slide-tight .MathJax_SVG_Display {
  font-size: 0.78em !important;
}

.reveal .slides section.math-compact-slide-tight .MathJax_Display,
.reveal .slides section.math-compact-slide-tight .MathJax_SVG_Display {
  margin: 0.55em auto !important;
}

/* Softmax proof: top displayed loss formula slightly smaller than other math on this slide */
.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq .MathJax,
.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq .MathJax_Display,
.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq .MathJax_SVG,
.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq .MathJax_SVG_Display {
  font-size: 0.7em !important;
}

.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq .MathJax_Display,
.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq .MathJax_SVG_Display {
  margin: 0.22em auto !important;
}

.reveal .slides section.proof-softmax-slide span.proof-softmax-proof-label {
  font-size: 0.82em;
  display: inline-block;
  margin: 0.1em 0 0.12em 0;
}

/* Softmax proof slide: tighter vertical rhythm (reduce overflow) */
.reveal .slides section.proof-softmax-slide {
  padding-top: 0.25em !important;
  padding-bottom: 0.35em !important;
}

.reveal .slides section.proof-softmax-slide h2 {
  margin-top: 0 !important;
  margin-bottom: 0.3em !important;
}

.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq {
  margin: 0.05em 0;
}

.reveal .slides section.proof-softmax-slide .proof-softmax-central-eq p {
  margin: 0.1em 0 !important;
}

.reveal .slides section.proof-softmax-slide.math-compact-slide-tight .MathJax_Display,
.reveal .slides section.proof-softmax-slide.math-compact-slide-tight .MathJax_SVG_Display {
  margin: 0.28em auto !important;
}

.reveal .slides section.proof-softmax-slide .proof-softmax-incremental {
  margin-top: 0.2em !important;
}

.reveal .slides section.proof-softmax-slide .proof-softmax-incremental ol li {
  margin: 0.12em 0 !important;
  line-height: 1.28 !important;
}

/* Softmax proof slide: slightly smaller black step text; math blocks keep slide math size/color */
.reveal .slides section.proof-softmax-slide .proof-softmax-incremental ol {
  font-size: 0.94em;
}

.reveal .slides section.proof-softmax-slide .proof-softmax-incremental ol li > p {
  margin: 0.2em 0 0.1em 0 !important;
  font-size: 1.06383em; /* ~1/0.94 so display math is unchanged vs pre-list */
}

.reveal .slides section.proof-softmax-slide .proof-softmax-step-label {
  color: #000 !important;
  font-size: 0.96em;
}

.reveal .slides section.proof-softmax-slide .proof-softmax-step-label .MathJax,
.reveal .slides section.proof-softmax-slide .proof-softmax-step-label .MathJax_SVG {
  color: #9e1b34 !important;
}

/* Chain-rule summary / exercise / answer (Module 06): smaller math than Jacobian slides */
.reveal .slides section.chain-rule-slide .MathJax,
.reveal .slides section.chain-rule-slide .MathJax_Display,
.reveal .slides section.chain-rule-slide .MathJax_SVG,
.reveal .slides section.chain-rule-slide .MathJax_SVG_Display {
  font-size: 0.68em !important;
}

.reveal .slides section.chain-rule-slide .MathJax_Display,
.reveal .slides section.chain-rule-slide .MathJax_SVG_Display {
  margin: 0.45em auto !important;
}

/* Chain-rule answer slide only: bump math slightly vs summary / exercise */
.reveal .slides section.chain-rule-slide.chain-rule-answer .MathJax,
.reveal .slides section.chain-rule-slide.chain-rule-answer .MathJax_Display,
.reveal .slides section.chain-rule-slide.chain-rule-answer .MathJax_SVG,
.reveal .slides section.chain-rule-slide.chain-rule-answer .MathJax_SVG_Display {
  font-size: 0.74em !important;
}

.reveal .slides section.chain-rule-slide.chain-rule-answer .MathJax_Display,
.reveal .slides section.chain-rule-slide.chain-rule-answer .MathJax_SVG_Display {
  margin: 0.5em auto !important;
}

/* Slides 10–12: a bit larger than slide 9 */
.reveal .slides section.math-compact-slide .MathJax,
.reveal .slides section.math-compact-slide .MathJax_Display,
.reveal .slides section.math-compact-slide .MathJax_SVG,
.reveal .slides section.math-compact-slide .MathJax_SVG_Display {
  font-size: 0.9em !important;
}

.reveal .slides section.math-compact-slide .MathJax_Display,
.reveal .slides section.math-compact-slide .MathJax_SVG_Display {
  margin: 0.65em auto !important;
}

/* Style equations and mathematical expressions */
.reveal .slides section .MathJax_Display {
  margin: 1.5em 0;
  padding: 0.5em;
  background-color: transparent;
  border-radius: 4px;
}

/* Style inline math */
.reveal .slides section .MathJax {
  color: #9E1B34;
}

/* Add subtle border to mathematical blocks */
.reveal .slides section .ua-block {
  background-color: transparent;
  border-left: 5px solid #9E1B34;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Regression vs classification slide (Module 07): paired callouts */
.reveal .slides section .rv-class-callout,
.reveal .slides section .rv-regress-callout {
  padding: 14px 18px 16px;
  border-radius: 6px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07);
  text-align: left;
}

.reveal .slides section .rv-class-callout {
  margin: 0 0 0.75em 0;
  border-left: 5px solid #9e1b34;
  background: linear-gradient(135deg, rgba(158, 27, 52, 0.09) 0%, rgba(158, 27, 52, 0.02) 100%);
}

.reveal .slides section .rv-regress-callout {
  margin: 0;
  border-left: 5px solid #2d4a6f;
  background: linear-gradient(135deg, rgba(45, 74, 111, 0.1) 0%, rgba(45, 74, 111, 0.02) 100%);
}

.reveal .slides section .rv-callout-title {
  display: block;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a4a4a;
  margin-bottom: 0.45em;
}

.reveal .slides section .rv-callout-body {
  margin: 0;
  padding: 0;
  font-size: 0.92em;
  line-height: 1.45;
  color: #2b2b2b;
}

.reveal .slides section .rv-callout-body p {
  margin: 0;
}

/* Style code blocks to look more mathematical */
.reveal pre {
  background-color: transparent;
  border: 1px solid #9E1B34;
  border-left: 4px solid #9E1B34;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- Module 07: multi-class computational graph (student-friendly layout) --- */
/* Edge-to-edge math card + beige chain rows; inset only title, figure, task, note */
.reveal .slides section.comp-graph-grad-slide {
  padding: 0.15em 0 0.2em !important;
}

.reveal .slides section.comp-graph-grad-slide h2,
.reveal .slides section.comp-graph-grad-slide .comp-graph-figure-wrap {
  padding-left: clamp(0.65rem, 3.5vw, 2.25rem);
  padding-right: clamp(0.65rem, 3.5vw, 2.25rem);
  box-sizing: border-box;
}

.reveal .slides section.comp-graph-grad-slide h2 {
  margin-top: 0 !important;
  margin-bottom: 0.2em !important;
  font-size: 1.22em !important;
}

.reveal .slides section.comp-graph-grad-slide h2::after {
  margin-top: 6px;
  margin-bottom: 8px;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-figure-wrap {
  margin: 0.02em auto 0.12em;
}

.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight .comp-graph-math-card .MathJax,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight .comp-graph-math-card .MathJax_Display,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight .comp-graph-math-card .MathJax_SVG,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight .comp-graph-math-card .MathJax_SVG_Display {
  font-size: 0.72em !important;
}

.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--w1
  .MathJax,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--w1
  .MathJax_Display,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--w1
  .MathJax_SVG,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--w1
  .MathJax_SVG_Display {
  font-size: 0.64em !important;
}

.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b2
  .MathJax,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b2
  .MathJax_Display,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b2
  .MathJax_SVG,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b2
  .MathJax_SVG_Display {
  font-size: 0.70em !important;
}

.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b1
  .MathJax,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b1
  .MathJax_Display,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b1
  .MathJax_SVG,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight
  .comp-graph-math-card--b1
  .MathJax_SVG_Display {
  font-size: 0.64em !important;
}

.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight .comp-graph-math-card .MathJax_Display,
.reveal .slides section.comp-graph-grad-slide.math-compact-slide-tight .comp-graph-math-card .MathJax_SVG_Display {
  margin: 0.22em auto !important;
}

.reveal .slides section.comp-graph-intro-slide .comp-graph-intro-card {
  max-width: 92%;
  margin: 0 auto 0.45em;
  padding: 0.65em 0.85em 0.75em;
  line-height: 1.48;
  border-radius: 8px;
  border-left: 5px solid #9e1b34;
  background: linear-gradient(
    135deg,
    rgba(158, 27, 52, 0.08) 0%,
    rgba(158, 27, 52, 0.02) 55%,
    rgba(255, 255, 255, 0.45) 100%
  );
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.reveal .slides section.comp-graph-intro-slide {
  padding-top: 0.15em !important;
  padding-bottom: 0.2em !important;
}

.reveal .slides section.comp-graph-intro-slide h2 {
  margin-top: 0 !important;
  margin-bottom: 0.22em !important;
  font-size: 1.28em !important;
}

.reveal .slides section.comp-graph-intro-slide h2::after {
  margin-top: 6px;
  margin-bottom: 8px;
}

.reveal .slides section.comp-graph-intro-slide .comp-graph-intro-card p {
  margin: 0 0 0.45em;
  font-size: 0.86em;
}

.reveal .slides section.comp-graph-intro-slide .comp-graph-intro-card p:last-child {
  margin-bottom: 0;
}

.reveal .slides section .comp-graph-figure-wrap {
  margin: 0.15em auto 0.35em;
  text-align: center;
}

.reveal .slides section .comp-graph-figure-wrap p {
  margin: 0;
}

.reveal .slides section .comp-graph-figure-wrap img {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.reveal .slides section.comp-graph-dims-slide {
  padding-top: 0.15em !important;
  padding-bottom: 0.2em !important;
}

.reveal .slides section.comp-graph-dims-slide h2 {
  margin-top: 0 !important;
  margin-bottom: 0.22em !important;
  font-size: 1.28em !important;
}

.reveal .slides section.comp-graph-dims-slide h2::after {
  margin-top: 6px;
  margin-bottom: 8px;
}

.reveal .slides section.comp-graph-dims-slide .comp-graph-dims-panel {
  margin: 0.35em auto 0;
  max-width: 95%;
  padding: 0.48em 0.75em 0.55em;
  border-radius: 8px;
  border: 1px solid rgba(45, 74, 111, 0.28);
  border-left: 5px solid #2d4a6f;
  background: linear-gradient(
    135deg,
    rgba(45, 74, 111, 0.09) 0%,
    rgba(45, 74, 111, 0.02) 100%
  );
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.reveal .slides section.comp-graph-dims-slide .comp-graph-dims-panel ul {
  margin: 0.2em 0 0;
  padding-left: 1.15em;
}

.reveal .slides section.comp-graph-dims-slide .comp-graph-dims-panel li {
  margin: 0.16em 0;
  line-height: 1.34;
  font-size: 0.84em;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-task-bar {
  margin: 0.15em 0 0.28em;
  padding: 0.32em clamp(0.65rem, 3.5vw, 2.25rem) 0.36em;
  border-radius: 0 8px 8px 0;
  border-left: 4px solid #9e1b34;
  background: linear-gradient(
    90deg,
    rgba(158, 27, 52, 0.11) 0%,
    rgba(255, 255, 255, 0.55) 100%
  );
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  line-height: 1.38;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-task-bar p {
  margin: 0;
  font-size: 0.88em;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-task-bar--w1 p,
.reveal .slides section.comp-graph-grad-slide .comp-graph-task-bar--w2 p {
  font-size: 0.82em;
  line-height: 1.3;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-task-bar--b2 p {
  font-size: 0.84em;
  line-height: 1.32;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-task-bar--b1 p {
  font-size: 0.8em;
  line-height: 1.3;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-task-bar,
.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card,
.reveal .slides section.comp-graph-grad-slide .comp-graph-bias-note {
  display: block;
  text-align: left;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  border-radius: 0;
  padding: 0.22em 0 0.28em;
  background: rgba(255, 255, 255, 0.78);
  border: solid rgba(158, 27, 52, 0.16);
  border-width: 1px 0;
  box-shadow: none;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Keep long MathJax inside the card (SVG + HTML-CSS) */
.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card .MathJax_SVG_Display > svg,
.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card .MathJax_SVG > svg {
  max-width: 100% !important;
  height: auto !important;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card .MathJax_Display,
.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card .MathJax_SVG_Display {
  max-width: 100% !important;
  box-sizing: border-box;
  overflow-x: auto;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card--w2,
.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card--w1 {
  font-size: 0.69em;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card--b2 {
  font-size: 0.67em;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card--b1 {
  font-size: 0.61em;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-math-card ul {
  margin: 0.15em 0 0;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  width: 100%;
  counter-reset: comp-graph-step;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li {
  counter-increment: comp-graph-step;
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0.14em 0;
  padding: 0.14em clamp(0.35rem, 2vw, 1.25rem) 0.16em clamp(1.85rem, 4vw, 2.35rem);
  border-radius: 0;
  border-left: 3px solid rgba(158, 27, 52, 0.35);
  background: rgba(246, 245, 239, 0.85);
  line-height: 1.22;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li .MathJax_SVG_Display > svg,
.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li .MathJax_SVG > svg {
  max-width: 100% !important;
  height: auto !important;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li .MathJax_Display,
.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li .MathJax_SVG_Display {
  max-width: 100% !important;
  box-sizing: border-box;
  overflow-x: auto;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li::before {
  content: counter(comp-graph-step);
  position: absolute;
  left: 0.32em;
  top: 0.22em;
  font-weight: 700;
  font-size: 0.78em;
  color: #9e1b34;
  font-family: inherit;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li.comp-graph-overall-rule {
  counter-increment: none;
  border-left-color: rgba(74, 144, 226, 0.55);
  background: rgba(255, 255, 255, 0.72);
  padding-left: clamp(0.35rem, 2vw, 1.25rem);
  text-align: center;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-chain-list li.comp-graph-overall-rule::before {
  content: "CHAIN RULE";
  position: static;
  display: block;
  margin: 0 0 0.15em 0;
  text-align: center;
  color: #2d6ea6;
  font-weight: 700;
  font-size: 0.66em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-bias-note {
  margin-top: 0.18em;
  padding: 0.32em clamp(0.65rem, 3.5vw, 2.25rem) 0.36em;
  border-radius: 0 8px 8px 0;
  border-left: 4px solid #4a90e2;
  background: linear-gradient(
    90deg,
    rgba(74, 144, 226, 0.14) 0%,
    rgba(255, 255, 255, 0.5) 100%
  );
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  line-height: 1.3;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-bias-note--b2 {
  font-size: 0.72em;
  margin-top: 0.12em;
  line-height: 1.3;
}

.reveal .slides section.comp-graph-grad-slide .comp-graph-bias-note--b1 {
  font-size: 0.68em;
  margin-top: 0.1em;
  line-height: 1.28;
}