/* ============================================
   THESIS PRE-DEFENSE — TOKEN STACKING META LEARNER
   Editorial · Academic · Confident
   ============================================ */

:root {
  /* Color palette — academic navy + burgundy + clean ivory paper */
  --bg: #f1f4f9;
  --bg-deep: #e2e8f1;
  --ink: #0a1e3d;             /* deep navy — almost black */
  --ink-soft: #1d3458;
  --ink-muted: #5a6c84;
  --rule: #c5d0e0;
  --paper: #ffffff;

  /* Accents — burgundy for emphasis, deep green for winners */
  --accent: #7d1d2c;          /* thesis burgundy / oxblood */
  --accent-deep: #561420;
  --accent-soft: #d4b5bb;
  --signal: #1c4a36;          /* deep emerald — winning data */
  --signal-soft: #c8d6cb;
  --warn: #8e6c1d;            /* academic ochre — warnings */

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Faint blueprint grid — academic, restrained */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image:
    linear-gradient(to right, var(--ink) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ink) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ============================================
   SLIDES CONTAINER
   ============================================ */
.slides-container {
  position: relative;
  width: 100%;
  height: 100vh;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 7vw;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s 0.6s;
  overflow-y: auto;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-content {
  width: 100%;
  max-width: 1400px;
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SLIDE TAGS & HEADINGS
   ============================================ */
.slide-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent);
}

.slide-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.slide-heading em {
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}

.lead {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.lead strong { font-weight: 600; color: var(--ink); }
.lead em { font-style: italic; color: var(--accent); }

.body-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.body-text em { font-style: italic; color: var(--accent-deep); }
.body-text strong { color: var(--ink); }

.caption {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.5;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.caption strong { font-style: normal; font-weight: 600; color: var(--ink); }
.caption em { color: var(--accent); }

/* ============================================
   SLIDE 1: TITLE
   ============================================ */
.slide-title {
  background: var(--paper);
}

.title-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  width: 100%;
  max-width: 1200px;
  position: relative;
}

.title-mark {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mark-line {
  width: 4rem;
  height: 1px;
  background: var(--accent);
}

.mark-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 500;
}

.title-main {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.title-main em {
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}

.title-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.meta-block p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.meta-sub {
  color: var(--ink-muted) !important;
  font-size: 0.85rem !important;
}

.title-decoration {
  position: absolute;
  top: -2rem;
  right: -3rem;
  width: 200px;
  height: 200px;
  border: 1px solid var(--accent-soft);
  border-radius: 50%;
  opacity: 0.4;
  z-index: -1;
}

.title-decoration::after {
  content: "";
  position: absolute;
  inset: 20%;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.5;
}

/* ============================================
   TWO-COLUMN LAYOUTS
   ============================================ */
.two-column {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.problem-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.problem-list li {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 2rem;
  position: relative;
}

.bullet-x {
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-mono);
}

.problem-list strong { color: var(--ink); font-weight: 600; }

.slide[data-slide="2"] .slide-heading {
  margin-bottom: 1rem;
}

.classes-intro {
  max-width: 1100px;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.classes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.class-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid rgba(125, 29, 44, 0.65);
  padding: 0.9rem 1rem 1rem;
  min-height: 108px;
  box-shadow: 0 10px 24px rgba(10, 30, 61, 0.05);
}

.class-card-accent {
  background: linear-gradient(135deg, rgba(125, 29, 44, 0.08), rgba(255, 255, 255, 0.95));
}

.class-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.class-card p {
  font-size: 0.88rem;
  line-height: 1.42;
  color: var(--ink-soft);
}

.problem-highlight-box {
  margin: 1.5rem 0 1.25rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(125, 29, 44, 0.25);
  background: linear-gradient(135deg, rgba(125, 29, 44, 0.08), rgba(255, 255, 255, 0.9));
  box-shadow: 0 12px 28px rgba(10, 30, 61, 0.06);
}

.problem-highlight-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.problem-highlight-box p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.problem-highlight-box strong { color: var(--ink); }

.problem-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.problem-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.1rem 1.1rem 1.2rem;
  min-height: 170px;
  box-shadow: 0 10px 24px rgba(10, 30, 61, 0.05);
}

.problem-card-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

.problem-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.problem-visual {
  display: grid;
  gap: 1.25rem;
}

.problem-image-stack {
  position: relative;
  min-height: 360px;
  padding: 0.75rem 0.5rem 0.25rem;
}

.stack-frame {
  position: absolute;
  width: min(100%, 290px);
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.45rem;
  box-shadow: 0 18px 40px rgba(10, 30, 61, 0.12);
  overflow: hidden;
}

.stack-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stack-frame-back {
  top: 1.1rem;
  left: 0;
  transform: rotate(-7deg);
  z-index: 1;
}

.stack-frame-middle {
  top: 3rem;
  left: 2.4rem;
  transform: rotate(4deg);
  z-index: 2;
}

.stack-frame-front {
  top: 5.2rem;
  left: 4.8rem;
  transform: rotate(-2deg);
  z-index: 3;
}

.problem-image-caption {
  padding-left: 0.2rem;
}

.problem-image-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.problem-image-caption p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ============================================
   BACKGROUND CARDS GRID
   ============================================ */
.background-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.bg-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 2rem;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.bg-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 600;
}

.bg-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0.5rem 0 0.75rem;
}

.bg-card p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.bg-card p strong { color: var(--ink); }
.bg-card p em { font-style: italic; color: var(--accent-deep); }

.highlight-card {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.highlight-card .card-num { color: var(--accent-soft); }
.highlight-card h3 { color: var(--paper); }
.highlight-card p { color: rgba(255, 255, 255, 0.85); }
.highlight-card p strong { color: var(--paper); }

/* ============================================
   LITERATURE REVIEW STARTER (Slide 4)
   ============================================ */
.lit-intro {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 70ch;
  margin-bottom: 1.4rem;
  line-height: 1.6;
}

.lit-streams {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  align-items: start;
}

.lit-stream {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
  position: relative;
}

.lit-stream:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.lit-stream:nth-child(1) { border-top: 3px solid var(--accent); }
.lit-stream:nth-child(2) { border-top: 3px solid #7c9e8a; }
.lit-stream:nth-child(3) { border-top: 3px solid #b5956a; }
.lit-stream:nth-child(4) { border-top: 3px solid #8b7bb5; }
.lit-stream:nth-child(5) { border-top: 3px solid #9e6b7c; }

.stream-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.stream-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.lit-stream:nth-child(2) .stream-num { color: #7c9e8a; }
.lit-stream:nth-child(3) .stream-num { color: #b5956a; }
.lit-stream:nth-child(4) .stream-num { color: #8b7bb5; }
.lit-stream:nth-child(5) .stream-num { color: #9e6b7c; }

.stream-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
}

.lit-stream p {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  flex: 1;
}

.stream-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 0.2em 0.5em;
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
}

/* ============================================
   ENSEMBLE SLIDES (Slides 16–18)
   ============================================ */

/* -- Shared slide shell -- */
.ens-slide-content {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.25rem 2rem 0.8rem !important;
  gap: 0 !important;
  overflow: hidden;
}

.ens-heading {
  font-size: 1.7rem !important;
  margin-bottom: 0.45rem !important;
  line-height: 1.15 !important;
}

/* -- Base learners bar -- */
.ens-base-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.ens-base-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.ens-base-pill {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.18em 0.65em;
  border-radius: 2px;
}

.ens-pill-dense { background: #d4e8d0; color: #1a5020; border: 1px solid #80b878; }
.ens-pill-vgg   { background: #d0ddf0; color: #1a2860; border: 1px solid #80a0d8; }

.ens-base-plus {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 700;
}

/* -- Two-column body -- */
.ens-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* -- Left column -- */
.ens-left {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ens-section-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.25rem;
}

.ens-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.ens-formula-box {
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ens-formula {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.4;
}

.ens-formula-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.ens-note {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-style: italic;
  line-height: 1.45;
}

.ens-accuracy-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  gap: 0.1rem;
  border-left: 4px solid var(--accent);
}

.ens-badge-meta { border-left-color: #7c9e8a; }

.ens-acc-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--paper);
}

.ens-acc-lbl {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.08em;
}

.ens-acc-lbl em {
  color: var(--accent-soft);
  font-style: normal;
  font-weight: 600;
}

.ens-auc-row {
  display: flex;
  gap: 1rem;
}

.ens-auc-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.ens-auc-item span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ens-auc-item strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

/* -- Right column: per-class bars -- */
.ens-right {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ens-class-bars {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.ens-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ens-bar-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--ink-soft);
  width: 110px;
  flex-shrink: 0;
  text-align: right;
}

.ens-bar-track {
  flex: 1;
  height: 18px;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.ens-bar-fill {
  height: 100%;
  background: var(--accent-deep);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--paper);
  font-weight: 600;
  transition: width 0.8s ease;
}

.ens-bar-low { background: #9e6b6b; }

/* -- Token Stacking slide (3-plot layout) -- */
.ens-token-content {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.25rem 2rem 0.8rem !important;
  gap: 0 !important;
  overflow: hidden;
}

.ens-token-header {
  flex-shrink: 0;
  margin-bottom: 0.6rem;
}

.ens-token-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2em 0.7em;
  background: var(--accent);
  color: var(--paper);
  letter-spacing: 0.06em;
}

.ens-token-plots {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.ens-token-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  min-height: 0;
}

/* ============================================
   MODEL RESULT SLIDES (Slides 12–14)
   ============================================ */

.model-result-content {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.3rem 2rem 0.8rem !important;
  gap: 0 !important;
  overflow: hidden;
}

.model-result-heading {
  font-size: 1.7rem !important;
  margin-bottom: 0.7rem !important;
  line-height: 1.15 !important;
}

.model-result-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.model-result-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  min-height: 0;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
  flex-shrink: 0;
}

.panel-img-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.3rem;
  overflow: hidden;
}

.result-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================
   LITERATURE TABLE
   ============================================ */
.lit-table, .results-table, .config-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--paper);
}

.lit-table thead, .results-table thead {
  border-bottom: 2px solid var(--ink);
}

.lit-table th, .results-table th {
  text-align: left;
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}

.lit-table td, .results-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}

.lit-table tr:hover, .results-table tr:hover {
  background: var(--bg-deep);
}

/* ============================================
   GAP LIST
   ============================================ */
.gap-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gap-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border-left: 3px solid var(--accent);
  transition: transform 0.3s ease;
}

.gap-item:hover {
  transform: translateX(8px);
  background: var(--bg-deep);
}

.gap-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  min-width: 3rem;
}

.gap-item h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.gap-item p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ============================================
   QUESTIONS GRID
   ============================================ */
.questions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.q-block {
  background: var(--paper);
  padding: 2rem;
  border: 1px solid var(--rule);
}

.q-block-accent {
  background: var(--ink);
  border-color: var(--ink);
}

.q-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-style: italic;
}

.q-block-accent .q-title { color: var(--accent-soft); }

.q-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.q-list li {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 1.5rem;
  position: relative;
}

.q-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.q-block-accent .q-list li { color: rgba(255, 255, 255, 0.85); }
.q-block-accent .q-list li::before { color: var(--accent-soft); }

/* ============================================
   METHODOLOGY DIAGRAM (SLIDE 8) — exact image match
   ============================================ */

.meth-slide-content {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.4rem 2rem 1rem !important;
  gap: 0 !important;
  overflow: hidden;
}

.meth-header-row {
  flex-shrink: 0;
  margin-bottom: 0.6rem;
}

.meth-heading {
  font-size: 1.75rem !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
}

/* Main diagram row */
.meth-diagram {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

/* Horizontal arrows */
.meth-h-arrow {
  font-size: 1.25rem;
  color: #888;
  flex-shrink: 0;
  align-self: center;
  line-height: 1;
}

/* ---- DATASET INPUT ---- */
.meth-dataset-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.meth-dataset-box {
  border: 2px dashed #888;
  padding: 0.5rem 0.55rem;
  background: transparent;
}

.meth-ds-imgs {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meth-ds-img {
  width: 58px;
  height: 46px;
  border: 1px solid #777;
}

.meth-ds-img1 { background: linear-gradient(135deg, #b07040 0%, #602010 100%); }
.meth-ds-img2 { background: linear-gradient(135deg, #e8c0b8 0%, #c05878 100%); }

.meth-ds-label {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.4;
  border: 1.5px dashed #aaa;
  padding: 0.15em 0.45em;
}

/* ---- MAIN PROCESSING BLOCK ---- */
.meth-processing-block {
  flex-shrink: 0;
  border: 1.5px dashed #bbb;
  padding: 0.5rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  align-self: stretch;
  justify-content: space-between;
  min-width: 190px;
  background: rgba(255,255,255,0.4);
}

.meth-section-hdr {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  padding: 0.2em 0.4em;
  color: var(--ink);
}

.meth-hdr-green { background: #b8ddb0; border: 1px solid #80b870; }
.meth-hdr-blue  { background: #b0cce8; border: 1px solid #80a8d0; }

/* Splitting sub-layout */
.meth-split-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0;
}

.meth-split-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meth-split-box {
  border: 1px solid #bbb;
  background: #fff;
  padding: 0.18rem 0.45rem;
  text-align: center;
  font-size: 0.58rem;
  line-height: 1.4;
  font-family: var(--font-mono);
}

.meth-split-sep {
  font-size: 0.75rem;
  color: #888;
}

.meth-split-test {
  border: 1px solid #bbb;
  background: #fff;
  padding: 0.18rem 0.6rem;
  text-align: center;
  font-size: 0.58rem;
  line-height: 1.4;
  font-family: var(--font-mono);
}

.meth-down-sep {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  line-height: 1;
}

/* Preprocessing */
.meth-prep-params {
  padding: 0.2rem 0.3rem;
  text-align: center;
}

.meth-prep-params span {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--ink-soft);
}

/* Augmentation */
.meth-augmentation {
  border: 1px solid #ccc;
  padding: 0.3rem 0.4rem;
  background: #fff;
}

.meth-aug-title {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
  letter-spacing: 0.04em;
}

.meth-aug-code {
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
}

.meth-aug-code span {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* Class Balancing */
.meth-class-bal {
  border: 1px solid #ccc;
  background: #fff;
  text-align: center;
  padding: 0.22rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  color: var(--ink);
  font-weight: 600;
}

/* ---- CNN MODELS BOX ---- */
.meth-cnn-box {
  flex-shrink: 0;
  border: 2px dashed #78a8d8;
  padding: 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  align-self: stretch;
  justify-content: space-between;
  min-width: 118px;
  background: rgba(220,236,255,0.2);
}

.meth-cnn-hdr {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  color: #1a50a0;
  text-align: center;
  background: #cce0f8;
  padding: 0.2em 0.3em;
  border: 1px solid #90c0e8;
}

.meth-cnn-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  justify-content: space-evenly;
}

.meth-cnn-item {
  border: 1px solid #b0c8e0;
  background: #fff;
  text-align: center;
  padding: 0.16rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  color: var(--ink);
}

/* ---- VERTICAL BLOCKS ---- */
.meth-vert-blk {
  flex-shrink: 0;
  width: 52px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.2rem;
}

.meth-vert-txt {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1.35;
}

.meth-ensemble-blk {
  background: #a8c8e8;
}
.meth-ensemble-blk .meth-vert-txt { color: #103060; }

.meth-select-blk {
  background: #7a1a1a;
}
.meth-select-blk .meth-vert-txt { color: #fff; }

/* ---- OUTPUT BOX ---- */
.meth-output-box {
  flex-shrink: 0;
  width: 72px;
  align-self: stretch;
  background: #2a6a32;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.35rem;
}

.meth-output-txt {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  line-height: 1.4;
}

/* ============================================
   ARCHITECTURE FLOW (SLIDE 7) — landscape 2-row
   ============================================ */
.architecture-flow {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.arch-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.6rem;
  align-items: stretch;
}

.arch-stage {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  transition: transform 0.3s ease, border-color 0.3s ease;
  min-width: 0;
}

.arch-stage:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.arch-highlight {
  background: var(--ink);
  border-color: var(--ink);
}

.arch-highlight .stage-num {
  background: var(--accent);
  color: var(--paper);
}

.arch-highlight .stage-body h4 { color: #ffffff; }
.arch-highlight .stage-body p  { color: #ffffff; }

.stage-num {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.stage-body { min-width: 0; }

.stage-body h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.stage-body p {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 400;
  font-family: var(--font-mono);
}

.arch-bridge {
  display: flex;
  justify-content: center;
  padding: 0.1rem 0;
}

.arch-arrow-down {
  font-size: 1.4rem;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
}

/* ============================================
   DATASET (SLIDE 8)
   ============================================ */
.dataset-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
}

.dataset-side {
  background: var(--paper);
  padding: 1.5rem;
  border: 1px solid var(--rule);
}

.dataset-side-after {
  background: var(--ink);
  border-color: var(--ink);
}

.data-side-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.dataset-side-after .data-side-title { color: var(--paper); }

.data-side-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.dataset-side-after .data-side-meta { color: var(--accent-soft); }

.data-table {
  width: 100%;
  font-size: 0.85rem;
}

.data-table td {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
  color: var(--ink-soft);
}

.dataset-side-after .data-table td {
  color: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(255,255,255,0.15);
}

.data-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}

.dataset-side-after .data-table .num { color: var(--paper); }

.data-table .num.low {
  color: var(--accent);
}

.data-table .num.accent {
  color: var(--accent-soft);
  font-size: 1rem;
}

.dataset-arrow {
  font-size: 2rem;
  color: var(--accent);
  font-weight: 300;
}

.data-split {
  margin-top: 1.5rem;
}

.data-split h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.5rem;
}

.split-bar {
  display: flex;
  height: 2.5rem;
  border-radius: 2px;
  overflow: hidden;
}

.split-train { flex: 64; background: var(--accent); display: flex; align-items: center; justify-content: center; color: var(--paper); font-size: 0.7rem; font-family: var(--font-mono); }
.split-val { flex: 16; background: var(--warn); display: flex; align-items: center; justify-content: center; color: var(--paper); font-size: 0.65rem; font-family: var(--font-mono); }
.split-test { flex: 20; background: var(--signal); display: flex; align-items: center; justify-content: center; color: var(--paper); font-size: 0.65rem; font-family: var(--font-mono); }

.aug-techniques {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.aug-techniques strong { color: var(--accent-soft); }

/* ============================================
   ARCHITECTURE DIAGRAM V2 — EXACT MATCH (Slide 10)
   ============================================ */

/* Slide layout */
.a2-slide-content {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.4rem 2rem 1rem !important;
  gap: 0 !important;
  overflow: hidden;
}

.a2-header {
  flex-shrink: 0;
  margin-bottom: 0.7rem;
}

.a2-heading {
  font-size: 1.75rem !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
}

/* Main diagram row */
.a2-diagram {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

/* ---- INPUT COLUMN ---- */
.a2-input-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.a2-input-box {
  border: 2px dashed #999;
  padding: 0.55rem 0.6rem;
  background: transparent;
}

.a2-skin-stack {
  position: relative;
  width: 60px;
  height: 70px;
}

.a2-skin {
  position: absolute;
  width: 52px;
  height: 62px;
  border: 1.5px solid #888;
}

.a2-skin-1 { top: 0;  left: 8px; background: #5a3820; z-index: 3; }
.a2-skin-2 { top: 4px; left: 4px; background: #8a5830; z-index: 2; }
.a2-skin-3 { top: 8px; left: 0;  background: #b07840; z-index: 1; }

.a2-col-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-align: center;
}

/* ---- ARROWS ---- */
.a2-h-arrow {
  font-size: 1.3rem;
  color: #888;
  flex-shrink: 0;
  align-self: center;
  line-height: 1;
}

.a2-br-arrow {
  font-size: 1rem;
  color: #888;
  flex-shrink: 0;
  padding: 0 0.2rem;
}

/* ---- BRANCHES COLUMN ---- */
.a2-branches-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: center;
  align-self: stretch;
}

.a2-branch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.a2-cnn-outer {
  display: flex;
  flex-direction: column;
}

.a2-cnn-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--paper);
  border: 1px dashed #aaa;
  padding: 0.1em 0.5em;
  text-align: center;
  display: block;
}

.a2-cnn-box {
  border: 1.5px solid #bbb;
  padding: 0.4rem 0.45rem;
  background: #fafafa;
}

.a2-blks {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.a2-blk {
  width: 42px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.a2-blk span {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  line-height: 1.3;
  text-align: center;
  color: rgba(0,0,0,0.7);
}

.a2-blk-sep {
  font-size: 0.6rem;
  color: #aaa;
  align-self: center;
  padding: 0 0.1rem;
  flex-shrink: 0;
}

.a2-blk-blue   { background: #cde4f8; }
.a2-blk-pink   { background: #f8d0dc; }
.a2-blk-orange { background: #f8e6cc; }
.a2-blk-teal   { background: #c8f0dc; }

/* ---- PREDICTION BOX ---- */
.a2-pred-box {
  background: #f8d0dc;
  border: 1.5px solid #e090a8;
  padding: 0.5rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  align-self: stretch;
}

.a2-pred-text {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  line-height: 1.6;
  text-align: center;
  color: var(--ink);
}

/* ---- CONVERGENCE BRACKET ---- */
.a2-bracket {
  position: relative;
  width: 22px;
  align-self: stretch;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.a2-bracket-bar {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 3px;
  right: 10px;
  border-top: 2px solid #999;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
}

.a2-bracket-arrow {
  font-size: 0.9rem;
  color: #888;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
}

/* ---- STACKING BOX ---- */
.a2-stack-box {
  flex-shrink: 0;
  width: 82px;
  align-self: stretch;
  background: #b8d8f8;
  border: 1.5px solid #78aad8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.35rem;
}

.a2-stack-text {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 1.55;
  text-align: center;
  color: var(--ink);
}

/* ---- VERTICAL PROCESSING BLOCKS ---- */
.a2-process-row {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
}

.a2-proc {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.2rem;
  min-width: 0;
}

.a2-vert-text {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.a2-proc-mha   { background: #7a1a1a; }
.a2-proc-mha   .a2-vert-text { color: #fff; }

.a2-proc-ln    { background: #2d7a50; }
.a2-proc-ln    .a2-vert-text { color: #fff; }

.a2-proc-flat  { background: #6555a8; }
.a2-proc-flat  .a2-vert-text { color: #fff; }

.a2-proc-dense { background: #d4c048; }
.a2-proc-dense .a2-vert-text { color: #333; }

.a2-proc-out   { background: #2a6a32; }
.a2-proc-out   .a2-vert-text { color: #fff; font-weight: 700; }

/* ============================================
   PROPOSED MODEL (SLIDE 9)
   ============================================ */
.proposed-model {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.model-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.model-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.model-box {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.85rem 1.2rem;
  min-width: 130px;
  text-align: center;
  transition: transform 0.3s ease;
}

.model-box:hover { transform: translateY(-3px); }

.model-input { background: var(--bg-deep); }
.model-output { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.model-output .box-label { color: var(--signal-soft); }

.model-cnn { background: var(--paper); border-left: 3px solid var(--accent); }
.model-stack-box { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.model-stack-box .box-label { color: var(--accent-soft); }

.model-attention {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  padding: 1.2rem 1.5rem;
  box-shadow: 0 8px 24px rgba(184, 52, 28, 0.25);
}
.model-attention .box-label { color: var(--accent-soft); }

.box-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.model-box p {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink);
}

.model-stack-box p, .model-output p, .model-attention p { color: var(--paper); }

.prob-shape {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 0.25rem;
}

.model-arrow {
  font-size: 1.4rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.model-arrow-down {
  font-size: 1.8rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ============================================
   EQUATIONS (SLIDE 10)
   ============================================ */
.equations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.eq-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.eq-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.eq-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.eq-math {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
  padding: 1rem 1.2rem;
  background: var(--bg-deep);
  border-left: 3px solid var(--accent);
  margin-bottom: 0.75rem;
  overflow-x: auto;
}

.eq-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ============================================
   TRAINING CONFIG + ALGORITHM (SLIDE 11)
   ============================================ */
.train-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
}

.train-config h3, .train-algo h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.config-table {
  width: 100%;
  background: var(--paper);
}

.config-table td {
  padding: 0.75rem 1.2rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}

.config-table td:nth-child(2) {
  text-align: right;
  font-family: var(--font-mono);
}

.algo-block {
  background: var(--ink);
  color: var(--bg);
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
  border-radius: 2px;
}

.algo-comment { color: var(--accent-soft); }

/* ============================================
   RESULTS BAR CHART (SLIDE 13)
   ============================================ */
.ensemble-results {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bar-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.bar-label strong {
  color: var(--accent);
  font-weight: 700;
}

.bar {
  height: 2.5rem;
  background: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.85rem;
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 2px;
  position: relative;
  animation: barFill 0.9s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

@keyframes barFill {
  from { width: 0% !important; }
}

.bar-winner {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 4px 16px rgba(184, 52, 28, 0.3);
}

.bar-faded { background: var(--ink-muted); }
.bar-loser { background: #8a7a6a; }

.metrics-callout {
  background: var(--ink);
  padding: 1.75rem;
  color: var(--paper);
}

.metrics-callout h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--accent-soft);
  margin-bottom: 1.25rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.metric {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--paper);
  line-height: 1;
}

.metric-name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-top: 0.4rem;
}

/* Results table emphasis */
.results-table .winner td {
  background: var(--signal-soft);
  color: var(--ink);
  font-weight: 600;
}
.results-table .runner-up td {
  background: rgba(184, 52, 28, 0.08);
}

/* ============================================
   ViT ANALYSIS (SLIDE 14)
   ============================================ */
.vit-analysis {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: center;
}

.vit-fact {
  text-align: center;
  padding: 2rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--warn);
}

.fact-stat {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 600;
  color: var(--warn);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.vit-fact p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.vit-fact strong { color: var(--accent); }

.vit-reasons {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.reason-block {
  display: flex;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  border-left: 3px solid var(--ink);
}

.reason-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1;
}

.reason-block h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.reason-block p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.reason-block strong { color: var(--ink); }

/* ============================================
   CONTRIBUTIONS (SLIDE 15)
   ============================================ */
.contributions {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contrib-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contrib-card {
  background: var(--paper);
  padding: 1.75rem;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent);
  transition: transform 0.3s ease;
}

.contrib-card:hover { transform: translateY(-4px); }

.contrib-card:nth-child(2) { border-top-color: var(--signal); }
.contrib-card:nth-child(3) { border-top-color: var(--warn); }

.contrib-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1rem;
}

.contrib-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contrib-card li {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 1.25rem;
  position: relative;
}

.contrib-card li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
}

.contrib-card li strong { color: var(--ink); font-weight: 600; }
.contrib-card li em { font-style: italic; color: var(--accent); }

/* ============================================
   LIMITATIONS (SLIDE 16)
   ============================================ */
.limit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.limit-side {
  background: var(--paper);
  padding: 2rem;
  border: 1px solid var(--rule);
}

.limit-side-future {
  background: var(--ink);
  border-color: var(--ink);
}

.lim-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.limit-side-future .lim-title { color: var(--accent-soft); }

.lim-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lim-list li {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  padding-left: 1.5rem;
  position: relative;
}

.lim-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

.limit-side-future .lim-list li { color: rgba(255, 255, 255, 0.85); }
.limit-side-future .lim-list li::before { color: var(--accent-soft); }

.lim-list li strong { color: var(--ink); font-weight: 600; }
.limit-side-future .lim-list li strong { color: var(--paper); }

/* ============================================
   END SLIDE (SLIDE 17)
   ============================================ */
.slide-end {
  background: var(--ink);
  color: var(--paper);
}

.end-content {
  text-align: center;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.end-mark {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--accent-soft);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
}

.end-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 300;
  color: var(--paper);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0;
}

.end-heading em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.end-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.75);
  max-width: 700px;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.end-quote em { color: var(--accent-soft); }

.end-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 0;
}

.end-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.end-stat span {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent-soft);
  line-height: 1;
}

.end-stat label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.5rem;
}

.end-team {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.end-team p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.end-sub {
  font-size: 0.8rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.end-prompt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent-soft);
  margin-top: 1.5rem;
}

/* ============================================
   NAVIGATION CHROME
   ============================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rule);
  z-index: 100;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-counter {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  z-index: 100;
  background: var(--paper);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

#currentSlide { color: var(--accent); font-weight: 700; }
.counter-divider { margin: 0 0.4rem; color: var(--rule); }

.slide-end ~ .slide-counter,
.slide.slide-end + * + * + .slide-counter { color: var(--paper); }

.nav-hint {
  position: fixed;
  bottom: 1.5rem;
  left: 2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  z-index: 100;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.nav-hint:hover { opacity: 1; }

.nav-hint kbd {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin: 0 0.1rem;
  color: var(--ink);
}

.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.nav-arrow:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.nav-prev { left: 1.5rem; }
.nav-next { right: 1.5rem; }

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-arrow:disabled:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--rule);
  transform: translateY(-50%);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .two-column,
  .questions-grid,
  .train-grid,
  .vit-analysis,
  .limit-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .classes-grid,
  .problem-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .background-grid,
  .equations-grid {
    grid-template-columns: 1fr;
  }
  .lit-streams {
    grid-template-columns: repeat(2, 1fr);
  }
  .contrib-row {
    grid-template-columns: 1fr;
  }
  .ensemble-results {
    grid-template-columns: 1fr;
  }
  .dataset-grid {
    grid-template-columns: 1fr;
  }
  .dataset-arrow { transform: rotate(90deg); }
  .problem-image-stack {
    min-height: 300px;
  }
  .stack-frame {
    width: min(100%, 260px);
  }
  .stack-frame-middle {
    left: 2rem;
  }
  .stack-frame-front {
    left: 4rem;
  }
  .slide { padding: 4vh 5vw; }

  /* Architecture: collapse 3-col rows to single column */
  .arch-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .arch-row > .arch-arrow {
    transform: rotate(90deg);
    font-size: 1.3rem;
    padding: 0.15rem 0;
  }
}

@media (max-width: 640px) {
  .nav-arrow { display: none; }
  .nav-hint { display: none; }
  .title-meta { grid-template-columns: 1fr; }
  .classes-grid,
  .problem-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PRINT / PDF EXPORT — landscape 16:9
   ============================================ */
@page {
  size: 13.333in 7.5in;
  margin: 0;
}

@media print {
  html, body {
    height: auto;
    overflow: visible;
    background: var(--bg);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body::before { display: none !important; }

  .slides-container { height: auto; }

  .slide {
    position: relative;
    inset: auto;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: 13.333in;
    height: 7.5in;
    padding: 0.45in 0.7in;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    page-break-after: always;
    page-break-inside: avoid;
    break-after: page;
    break-inside: avoid;
    animation: none !important;
    transition: none !important;
  }
  .slide:last-child {
    page-break-after: auto;
    break-after: auto;
  }
  .slide-content { animation: none !important; }

  /* Force bar widths to render at full width in print (not 0%) */
  .bar { animation: none !important; }

  .nav-arrow,
  .nav-hint,
  .progress-bar,
  .slide-counter { display: none !important; }
}

/* ============================================================
   XAI — EXPLAINABILITY SLIDE
   ============================================================ */
.xai-slide-content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.8rem 2.2rem 1.4rem;
}

.xai-header {
  flex-shrink: 0;
}

.xai-heading {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.xai-subhead {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
}

.xai-body {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: start;
  flex: 1;
  min-height: 0;
}

.xai-body-single {
  grid-template-columns: 1fr auto;
}

.xai-panel-wide {
  /* takes full available column in single mode */
}

.xai-img-wrap-wide {
  min-height: 220px;
}

.xai-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.9rem;
  box-shadow: 0 1px 4px rgba(10,30,61,0.06);
}

.xai-panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.xai-tech-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.xai-badge-gradcam {
  background: rgba(180, 30, 50, 0.12);
  color: var(--accent);
  border: 1px solid rgba(125, 29, 44, 0.3);
}


.xai-panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.3;
}

.xai-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  border-radius: 6px;
  overflow: hidden;
  min-height: 0;
}

.xai-img {
  width: 100%;
  height: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

.xai-caption {
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.45;
  margin: 0;
}

.xai-caption em {
  color: var(--ink-soft);
  font-style: normal;
  font-weight: 600;
}

/* Takeaway column */
.xai-takeaway {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
  padding: 1rem 1.1rem;
  background: rgba(28, 74, 54, 0.06);
  border: 1px solid rgba(28, 74, 54, 0.2);
  border-radius: 10px;
  min-width: 200px;
}

.xai-take-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink);
}

.xai-take-icon {
  color: var(--signal);
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.xai-take-row strong {
  color: var(--ink-soft);
}
