@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

:root {
  --axis-x: #d62828;
  --axis-y: #2a9d3f;
  --axis-z: #2f6ed3;
}

/* Global reveal surface + typography */
.reveal {
  font-family: 'Quicksand', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
}

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  color: #1c5b84;
  text-transform: none;
  font-family: 'Quicksand', sans-serif;
}

.reveal .axis-x {
  color: var(--axis-x);
  font-weight: 700;
}

.reveal .axis-y {
  color: var(--axis-y);
  font-weight: 700;
}

.reveal .axis-z {
  color: var(--axis-z);
  font-weight: 700;
}

.reveal a {
  color: #007bff;
  text-decoration: none;
  transition: color .15s ease;
}

.reveal a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.reveal blockquote {
  border-left: 4px solid #007bff;
  background: #f1f3f5;
  padding: 15px;
  font-style: italic;
  color: #495057;
}

.reveal .progress {
  background: rgba(0, 0, 0, .2);
  color: #007bff;
  height: 4px;
}

.reveal .slides section {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

.reveal pre code {
  max-height: unset !important;
  overflow-y: auto !important;
}

.reveal ol li {
  list-style-position: outside !important;
  margin-left: 40px !important;
  padding-left: 0 !important;
}

.reveal ul li {
  margin-left: 40px !important;
  padding-left: 0 !important;
}

/* Nice surface for embeds (if you want an outer frame) */
.embed-surface {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(28, 91, 132, 0.12);
}

/* Consistent treatment for photographic media cards */
.reveal img.photo-card {
  border-radius: 12px;
  border: 2px solid #d9e4ee;
  box-shadow: 0 6px 18px rgba(28, 91, 132, 0.15);
  object-fit: cover;
}

/* Section-divider slides for Part transitions */
.reveal .slides section.section-divider {
  background: linear-gradient(135deg, #0f4c75 0%, #1c5b84 55%, #3282b8 100%);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden !important;
  max-height: none !important;
}

.reveal .slides section:has(> h1.section-divider) {
  background: linear-gradient(135deg, #0f4c75 0%, #1c5b84 55%, #3282b8 100%);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden !important;
  max-height: none !important;
}

.reveal .slides section.section-divider h1 {
  color: #ffffff;
  font-size: 2.1em;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.reveal .slides section:has(> h1.section-divider) h1.section-divider {
  color: #ffffff;
  font-size: 2.1em;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Match earlier weeks' handling of large diagrams */
.reveal .diagram-scroll {
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.reveal .diagram-scroll img {
  max-width: none;
  height: auto;
}

.reveal .diagram-scroll img.diagram-register {
  width: 115%;
}

.reveal .diagram-scroll img.diagram-moder {
  width: 130%;
}

.reveal section iframe.r-stretch {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: block;
}

/* Hide any section explicitly marked as hidden */
.reveal .slides section.hidden {
  display: none !important;
}

/* Tighten space below lists on definition slides */
#what-is-a-timer ul:last-child {
  margin-bottom: 0.2rem;
}

/* Optional utility to make any single child fill the slide */
.fill-slide {
  height: 100%;
  width: 100%;
  display: grid;
}

.fill-slide>* {
  align-self: stretch;
  justify-self: stretch;
}

/* Quarto bundles a reset that sets `div.columns { display: initial; gap: initial }`,
 * which collapses the columns container to `display: inline` and produces a large
 * empty gap above the content on reveal.js slides. Force it back to flex, and
 * align children to the top so text columns don't get pushed down next to taller
 * image columns. */
.reveal .slides section .columns {
  display: flex !important;
  gap: 0.4rem !important;
  align-items: flex-start;
}

/* Half-slide animation: large but not full-screen */
/* Keep animation with consistent aspect ratio, not full-height */
iframe.half-anim {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 60vh;
  display: block;
}

/* Taller embed variant for complex interactive visuals */
iframe.tall-anim {
  width: 100%;
  height: 88vh;
  max-height: 88vh;
  display: block;
}

/* Reduce padding and maximize vertical room on the PWM visualizer slide */
.reveal .slides section#pwm-visualizer {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Rotation Matrix Explorer slide: full-width interactive without slide scroll */
.reveal .slides section#rotation-matrix-explorer-interactive {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  overflow: hidden !important;
}

.reveal .slides section#rotation-matrix-explorer-interactive iframe {
  width: 100% !important;
  height: 68vh !important;
  max-height: 68vh !important;
  display: block;
}

.reveal .slides section#rotation-matrix-explorer-interactive > p {
  margin: 0.25rem 0 0.35rem !important;
  font-size: 0.8em !important;
}

/* RC filter slide: ensure no scroll and tighter padding; slightly shorter iframe */
.reveal .slides section#pwm-rc-filter {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  overflow: hidden !important;
}

.reveal .slides section#pwm-rc-filter iframe {
  height: 88vh;
  max-height: 88vh;
}

/* Input Capture interactive slide: no scroll, larger iframe */
.reveal .slides section#input-capture-interactive {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  overflow: hidden !important;
}

.reveal .slides section#input-capture-interactive>h2 {
  display: none !important;
}

.reveal .slides section#input-capture-interactive iframe {
  height: 88vh;
  max-height: 88vh;
}

/* Aliasing animation slide: hide title and maximize iframe */
.reveal .slides section#aliasing-in-action {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  overflow: hidden !important;
}

.reveal .slides section#aliasing-in-action>h2 {
  display: none !important;
}

.reveal .slides section#aliasing-in-action iframe {
  height: 88vh !important;
  max-height: 88vh !important;
  width: 100% !important;
  display: block;
}

/* ============================================
   TABLES: Clean bordered style
   ============================================ */
.reveal table {
  border-collapse: collapse;
  width: auto;
  margin: 0.5em auto;
  font-size: 0.85em;
}

.reveal table th,
.reveal table td {
  border: 1px solid #c8d6e5;
  padding: 0.35em 0.7em;
  text-align: center;
}

.reveal table th {
  background: #1c5b84;
  color: #ffffff;
  font-weight: 600;
}

/* Inline code inside dark header cells: the default code colour is too dark on #1c5b84 */
.reveal table th code {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  padding: 0 0.2em;
  border-radius: 3px;
}

.reveal table tr:nth-child(even) {
  background: #eef3f8;
}

.reveal table tr:nth-child(odd) {
  background: #ffffff;
}

/* Compact table: shrink first two columns, let last column expand */
.reveal .compact-params table th:nth-child(1),
.reveal .compact-params table td:nth-child(1) {
  white-space: nowrap;
  width: 1%;
}

.reveal .compact-params table th:nth-child(2),
.reveal .compact-params table td:nth-child(2) {
  white-space: nowrap;
  width: 1%;
}

/* Larger code blocks — use absolute size to override .smaller scaling */
.reveal .slides section.larger-code pre code {
  font-size: 22px !important;
  line-height: 1.45 !important;
}

/* Smaller text utility */
.reveal .smaller-text {
  font-size: 0.7em !important;
}

/* Even smaller text utility */
.reveal .tiny-text {
  font-size: 0.5em !important;
}

/* Force vertical scrolling for slides with .scrollable class */
.reveal .slides section.scrollable {
  overflow-y: auto !important;
  display: block !important;
  height: 100% !important;
  max-height: 850px !important;
  /* Slightly less than 900 to avoid bottom clip */
  padding-bottom: 50px !important;
  /* Ensure last line is not right at edge */
  box-sizing: border-box !important;
}

/* ============================================
   DEFAULT: Scroll only when content overflows
   ============================================ */
.reveal .slides section {
  overflow-y: auto !important;
  max-height: 850px !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Hide scrollbars while preserving scroll behavior */
.reveal .slides section::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ============================================
   MERMAID DIAGRAMS: Light background + larger text
   ============================================ */
.reveal .mermaid {
  background: #f8f9fa !important;
  border-radius: 8px;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Force light node backgrounds */
.reveal .mermaid .node rect,
.reveal .mermaid .node circle,
.reveal .mermaid .node ellipse,
.reveal .mermaid .node polygon,
.reveal .mermaid .node path {
  fill: #e9ecef !important;
  stroke: #1c5b84 !important;
  stroke-width: 2px !important;
}

/* Subgraph backgrounds */
.reveal .mermaid .cluster rect {
  fill: #ffffff !important;
  stroke: #1c5b84 !important;
}

/* Make text 50% larger */
.reveal .mermaid text {
  font-size: 18px !important;
}

.reveal .mermaid .nodeLabel,
.reveal .mermaid .label,
.reveal .mermaid .edgeLabel,
.reveal .mermaid .cluster-label {
  font-size: 18px !important;
}

.reveal .mermaid .edgeLabel {
  background-color: #f8f9fa !important;
}

/* Flowchart specific */
.reveal .mermaid .flowchart-link {
  stroke: #1c5b84 !important;
}

.reveal .mermaid marker path {
  fill: #1c5b84 !important;
}

/* ============================================
   PART TITLE SLIDES: Vertically centered
   ============================================ */
.reveal .slides section.center-vertical,
.reveal .slides section[data-vertical-center="true"] {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  height: 100% !important;
}

/* Auto-detect "Part X:" slides - these have only an h2 with "Part" in it */
.reveal .slides section > h2:only-child {
  margin-top: auto !important;
  margin-bottom: auto !important;
}

/* ============================================
   FLOW UTILITIES + OPTIONAL TRACK MARKERS
   ============================================ */
.reveal .slides section.flow-bridge {
  background: linear-gradient(135deg, #eef6ff 0%, #dbeeff 100%);
  border-left: 8px solid #1c5b84;
}

.reveal .slides section.checkpoint {
  background: linear-gradient(135deg, #f4f8fb 0%, #eaf2f9 100%);
  border: 2px dashed #5d88a8;
  border-radius: 14px;
}

.reveal .slides section.appendix-gateway {
  background: linear-gradient(135deg, #fff8e8 0%, #fff2cf 100%);
  border-left: 8px solid #b98200;
}

.reveal .slides section.backup:not(.section-divider) {
  background: linear-gradient(180deg, #fff9ef 0%, #fff3dc 100%);
  border-left: 6px solid #d39522;
}

.reveal .slides section.backup:not(.section-divider)::before {
  content: "BACKUP";
  position: absolute;
  top: 10px;
  right: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #d39522;
  color: #fff;
  font-size: 0.48em;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.reveal .slides section.async:not(.section-divider) {
  background: linear-gradient(180deg, #eefaf4 0%, #e2f5ea 100%);
  border-left: 6px solid #1f8b5c;
}

.reveal .slides section.async:not(.section-divider)::before {
  content: "POST-CLASS";
  position: absolute;
  top: 10px;
  right: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #1f8b5c;
  color: #fff;
  font-size: 0.48em;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ============================================
   EE1021 WEEK 1: COURSE ROADMAP + NATIVE VISUALS
   ============================================ */
.reveal .draft-notice {
  max-width: 1160px;
  margin: 0 auto 0.55em;
  padding: 0.42em 0.72em;
  color: #6b4a00;
  background: #fff4cf;
  border: 1px solid #dfbd55;
  border-left: 6px solid #c48115;
  border-radius: 8px;
  font-size: 0.58em;
  line-height: 1.35;
  text-align: left;
}

.reveal .draft-notice p {
  margin: 0;
}

.reveal .schedule-intro {
  max-width: 1180px;
  margin: 0 auto 0.65em;
  padding: 0.38em 0.8em;
  color: #174a6b;
  background: #eaf3f9;
  border-left: 5px solid #1c5b84;
  border-radius: 8px;
  font-size: 0.73em;
  text-align: left;
}

.reveal .schedule-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38em;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.reveal .schedule-card {
  position: relative;
  min-height: 2.3em;
  padding: 0.38em 0.58em 0.38em 3.1em;
  color: #263744;
  background: #ffffff;
  border: 1px solid #c8dce9;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(28, 91, 132, 0.08);
  font-size: 0.64em;
  line-height: 1.25;
}

.reveal .schedule-card strong {
  display: block;
  margin-bottom: 0.08em;
  color: #164c70;
  font-size: 1.06em;
}

.reveal .schedule-card p,
.reveal .setup-step p {
  margin: 0;
}

.reveal .week-number {
  position: absolute;
  top: 50%;
  left: 0.7em;
  display: grid;
  width: 1.75em;
  height: 1.75em;
  place-items: center;
  color: #ffffff;
  background: #1c5b84;
  border-radius: 50%;
  font-weight: 700;
  transform: translateY(-50%);
}

.reveal .week-current {
  border-color: #2a9d8f;
  background: #f0faf8;
}

.reveal .week-current .week-number {
  background: #21867a;
}

.reveal .assessment-card {
  border-color: #d59627;
  background: #fff8e8;
}

.reveal .assessment-card .week-number {
  background: #c48115;
}

.reveal .setup-intro {
  max-width: 1040px;
  margin: 0 auto 0.75em;
  font-size: 0.74em;
  text-align: left;
}

.reveal .setup-flow {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  gap: 0.35em;
  max-width: 1220px;
  margin: 0 auto;
}

.reveal .setup-step {
  flex: 1 1 0;
  min-height: 6.6em;
  padding: 0.55em 0.65em;
  color: #243d51;
  background: linear-gradient(180deg, #ffffff 0%, #f1f7fb 100%);
  border: 1px solid #bdd5e4;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(28, 91, 132, 0.1);
  font-size: 0.62em;
  line-height: 1.3;
  text-align: left;
}

.reveal .setup-step strong {
  display: block;
  margin: 0.2em 0 0.3em;
  color: #164c70;
  font-size: 1.16em;
}

.reveal .setup-step-number {
  display: inline-grid;
  width: 1.65em;
  height: 1.65em;
  place-items: center;
  color: #ffffff;
  background: #1c5b84;
  border-radius: 50%;
  font-weight: 700;
}

.reveal .flow-arrow {
  display: flex;
  align-items: center;
  color: #4c85a7;
  font-size: 1.35em;
  font-weight: 700;
}

.reveal .iteration-table table {
  width: 86%;
  margin-top: 0.7em;
  font-size: 0.73em;
}

.reveal .iteration-table th,
.reveal .iteration-table td {
  padding: 0.48em 0.72em;
}

.reveal .binding-diagram {
  width: 92%;
  box-sizing: border-box;
  margin: 0.4em auto 0;
  padding: 0.65em 0.85em;
  background: #f2f7fa;
  border: 1px solid #bfd4e1;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(28, 91, 132, 0.09);
}

.reveal .binding-row {
  display: grid;
  grid-template-columns: 3.6em 1.2em 1fr;
  align-items: center;
  gap: 0.3em;
  margin: 0.28em 0;
  font-size: 0.77em;
  text-align: left;
}

.reveal .binding-row code {
  padding: 0.22em 0.38em;
  color: #ffffff;
  background: #465668;
  border-radius: 5px;
  text-align: center;
}

.reveal .binding-arrow {
  color: #1c5b84;
  font-size: 1.35em;
  font-weight: 700;
  text-align: center;
}

.reveal .binding-value {
  display: inline-block;
  padding: 0.23em 0.42em;
  color: #ffffff;
  background: #9f3b3b;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

.reveal .binding-value-new {
  background: #187e70;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.36);
}

.reveal .binding-note {
  margin: 0.65em 0 0;
  color: #536674;
  font-size: 0.57em;
  line-height: 1.35;
  text-align: left;
}

.reveal .profile-card,
.reveal .session-card {
  min-height: 8.2em;
  padding: 0.75em 0.9em !important;
  background: linear-gradient(180deg, #ffffff 0%, #f1f7fb 100%);
  border: 1px solid #c4d9e6;
  border-radius: 12px;
  box-shadow: 0 3px 9px rgba(28, 91, 132, 0.08);
  font-size: 0.72em;
  text-align: left;
}

.reveal .profile-card > p:first-child,
.reveal .session-card > p:first-child {
  margin-top: 0;
  color: #164c70;
  font-size: 1.14em;
}

.reveal .profile-card ul,
.reveal .session-card ul {
  margin: 0.35em 0 0;
}

.reveal .profile-card li,
.reveal .session-card li {
  margin-left: 1.15em !important;
}

.reveal .assessment-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55em;
  max-width: 1200px;
  margin: 0.85em auto 0;
}

.reveal .assessment-item {
  min-height: 7em;
  padding: 0.7em;
  color: #244154;
  background: #ffffff;
  border: 1px solid #bfd4e1;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(28, 91, 132, 0.08);
  font-size: 0.68em;
  line-height: 1.25;
  text-align: center;
}

.reveal .assessment-item p {
  margin: 0.18em 0 0;
}

.reveal .assessment-item strong {
  display: block;
  margin-top: 0.18em;
  color: #164c70;
  font-size: 1.1em;
}

.reveal .assessment-weight {
  display: inline-grid;
  min-width: 2.25em;
  padding: 0.15em 0.35em;
  color: #ffffff;
  background: #1c5b84;
  border-radius: 999px;
  font-size: 1.5em;
  font-weight: 700;
}

.reveal .computer-capabilities {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7em;
  max-width: 1050px;
  margin: 0.6em auto 0.7em;
}

.reveal .capability-card {
  min-height: 6.3em;
  padding: 0.7em 0.85em 0.7em 4em;
  position: relative;
  color: #263c4d;
  background: #f1f7fb;
  border-left: 6px solid #1c5b84;
  border-radius: 10px;
  font-size: 0.7em;
  line-height: 1.3;
  text-align: left;
}

.reveal .capability-card p {
  margin: 0.2em 0 0;
}

.reveal .capability-card strong {
  display: block;
  color: #164c70;
  font-size: 1.16em;
}

.reveal .capability-icon {
  position: absolute;
  top: 50%;
  left: 0.55em;
  display: grid;
  width: 2em;
  height: 2em;
  place-items: center;
  color: #ffffff;
  background: #1c5b84;
  border-radius: 50%;
  font-size: 1.15em;
  font-weight: 700;
  transform: translateY(-50%);
}

.reveal .algorithm-flow {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  gap: 0.35em;
  max-width: 1200px;
  margin: 0.6em auto;
}

.reveal .algorithm-step {
  flex: 1 1 0;
  min-height: 5.4em;
  padding: 0.55em 0.65em;
  color: #263c4d;
  background: #f1f7fb;
  border: 1px solid #bdd5e4;
  border-radius: 10px;
  font-size: 0.63em;
  line-height: 1.3;
  text-align: left;
}

.reveal .algorithm-step p {
  margin: 0.18em 0 0;
}

.reveal .algorithm-step strong {
  display: block;
  margin-top: 0.15em;
  color: #164c70;
  font-size: 1.12em;
}

.reveal .algorithm-step-number {
  display: inline-grid;
  width: 1.55em;
  height: 1.55em;
  place-items: center;
  color: #ffffff;
  background: #1c5b84;
  border-radius: 50%;
  font-weight: 700;
}

.reveal .success-routine {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45em;
  max-width: 1240px;
  margin: 0.8em auto 0;
}

.reveal .success-step {
  min-height: 7.4em;
  padding: 0.6em 0.65em;
  color: #263c4d;
  background: linear-gradient(180deg, #ffffff 0%, #f1f7fb 100%);
  border: 1px solid #bfd4e1;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(28, 91, 132, 0.08);
  font-size: 0.61em;
  line-height: 1.3;
  text-align: left;
}

.reveal .success-step p {
  margin: 0.2em 0 0;
}

.reveal .success-step strong {
  display: block;
  margin-top: 0.18em;
  color: #164c70;
  font-size: 1.12em;
}

.reveal .success-step-number {
  display: inline-grid;
  width: 1.55em;
  height: 1.55em;
  place-items: center;
  color: #ffffff;
  background: #1c5b84;
  border-radius: 50%;
  font-weight: 700;
}

.reveal .try-it {
  max-width: 1240px;
  margin: 0.7em auto 0;
  padding: 0.48em 0.7em;
  color: #294154;
  background: #fff8e8;
  border: 1px solid #e3c583;
  border-left: 5px solid #c48115;
  border-radius: 8px;
  font-size: 0.61em;
  line-height: 1.35;
  text-align: left;
}

.reveal .try-it p {
  margin: 0;
}

.reveal .ide-mockup {
  display: grid;
  grid-template-columns: 2.3em minmax(150px, 1.1fr) minmax(0, 4.6fr);
  grid-template-rows: 2.1em 6.6em 5.6em 1.7em;
  gap: 0.22em;
  max-width: 1240px;
  margin: 0.6em auto;
  padding: 0.3em;
  color: #eaf3fa;
  background: #263744;
  border: 1px solid #0e2738;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(28, 91, 132, 0.15);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62em;
  text-align: left;
}

/* Activity Bar: thin strip on the far left, spans editor + panel rows */
.reveal .ide-activity {
  grid-column: 1;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  padding-top: 0.6em;
  color: #c9d6e2;
  background: #1f2e3b;
  border-radius: 7px;
  font-size: 1.15em;
}

/* Explorer sidebar */
.reveal .ide-explorer {
  grid-column: 2;
  grid-row: 1 / 4;
  padding: 0.55em 0.7em;
  color: #263744;
  background: #f1f5f9;
  border-radius: 7px;
}

.reveal .ide-tree {
  margin-top: 0.6em;
  line-height: 1.7;
}

.reveal .ide-file {
  display: inline-block;
  margin-left: 1.4em;
  padding: 0 0.35em;
  color: #164c70;
  background: #dbe8f3;
  border-radius: 3px;
}

/* Editor tab strip with the Run button at the right */
.reveal .ide-tabs {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.6em 0 0;
  background: #38546a;
  border-radius: 7px 7px 0 0;
}

.reveal .ide-tab {
  padding: 0.35em 0.9em;
  color: #22313f;
  background: #fbfcfd;
  border-radius: 7px 7px 0 0;
}

.reveal .ide-run {
  padding: 0.15em 0.6em;
  color: #eaf3fa;
  background: #2e8b57;
  border-radius: 4px;
  font-weight: 700;
}

/* Editor body */
.reveal .ide-editor {
  grid-column: 3;
  grid-row: 2;
  padding: 0.5em 0.8em;
  color: #22313f;
  background: #fbfcfd;
  border-radius: 0 0 7px 7px;
}

.reveal .ide-editor pre {
  margin: 0;
  padding: 0;
  color: #164c70;
  background: transparent;
  box-shadow: none;
  font-size: 1.15em;
}

.reveal .ide-editor code {
  color: inherit;
}

/* Panel (Problems / Output / Terminal) under the editor */
.reveal .ide-terminal {
  grid-column: 3;
  grid-row: 3;
  padding: 0.45em 0.8em;
  color: #263744;
  background: #fbfcfd;
  border-radius: 7px;
}

.reveal .ide-panel-tabs {
  display: block;
  color: #5b6f80;
  font-family: 'Quicksand', system-ui, sans-serif;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}

.reveal .ide-panel-tabs b {
  color: #164c70;
  border-bottom: 2px solid #164c70;
}

.reveal .ide-terminal code {
  display: block;
  margin-top: 0.5em;
  color: #176a53;
  background: transparent;
  white-space: pre;
}

/* Status Bar across the full width */
.reveal .ide-status {
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  gap: 1.8em;
  align-items: center;
  padding: 0 0.9em;
  color: #eaf3fa;
  background: #164c70;
  border-radius: 7px;
  font-size: 0.95em;
}

.reveal .ide-status span:first-child {
  margin-right: auto;
}

.reveal .ide-panel-title {
  display: block;
  color: #164c70;
  font-family: 'Quicksand', system-ui, sans-serif;
  font-size: 0.9em;
  font-weight: 700;
}

@media print {
  .reveal .slides section {
    overflow: visible !important;
    max-height: none !important;
  }

  .reveal .schedule-card,
  .reveal .assessment-item,
  .reveal .success-step,
  .reveal .setup-step,
  .reveal .profile-card,
  .reveal .session-card {
    box-shadow: none;
  }

  .reveal pre code {
    white-space: pre-wrap;
  }
}

@media (max-width: 900px) {
  .reveal .schedule-grid {
    grid-template-columns: 1fr;
  }

  .reveal .setup-flow {
    gap: 0.2em;
  }

  .reveal .assessment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reveal .success-routine {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* EE1021 dense programming tables/code tweaks (moved from slides.qmd inline block
   so the style block does not render as a blank slide) */
.reveal pre { max-width: 100%; overflow-x: auto; box-sizing: border-box; }
.reveal pre code { white-space: pre; font-size: 0.95em; display: block; }
.reveal .columns .column pre { margin-top: 0.25rem; }
.reveal code { color: #111; }
.sourceCode span.kw { color: #0000ff !important; font-weight: normal !important; }
.sourceCode span.co { color: #007300 !important; font-style: normal !important; }
.sourceCode span.st { color: #b200b2 !important; }
.sourceCode span.dv { color: #ad0000 !important; }
.reveal li code:not(.sourceCode):not([class*="language-"]) {
  color: #1c5b84;
  font-weight: 700;
}
.compact-table table {
  font-size: 0.58em;
}
.operator-table table {
  font-size: 0.66em;
}
.centered-figure {
  text-align: center;
}
.centered-figure img {
  max-height: 58vh;
}
