/* === Classes specific to this deck === */
/* Extends assets/custom.css (palette and typography from the April deck). */

/* Value not measured yet: visible during rehearsal, unobtrusive on stage */
.pending {
  opacity: 0.35;
}

/* ── Title slide: elements the base stylesheet does not define ── */
.subtitle {
  font-size: 1.0em;
  color: var(--muted);
  margin-bottom: 1.2em;
  line-height: 1.4;
}

.authors {
  font-size: 0.95em;
  margin-bottom: 0.6em;
}

.meta {
  font-size: 0.72em;
  color: var(--muted);
  line-height: 1.6;
}

/* ── European Funds branding (title and closing slide) ── */
/* The FE mark, Polish national colours and the EU emblem must stay legible and
   keep their proportions, so the strip ships as one image, never rescaled. */
.ue-block {
  margin-top: 1.4em;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Reveal sets `.reveal section img { max-width: 95%; margin: 15px 0 }`, which
   stretches the strip and pushes it left — hence the higher specificity. */
.reveal .ue-block img.ue-belt {
  width: 60%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0;
  border: none;
  box-shadow: none;
  background: none;
}

.ue-caption {
  font-size: 0.58em;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 0.5em;
}

/* ── Thesis ── */
.thesis-box {
  background: var(--bg-soft);
  border-left: 6px solid var(--primary);
  padding: 0.9em 1.1em;
  font-size: 1.15em;
  line-height: 1.5;
  border-radius: 4px;
  margin: 0.6em 0 0.8em 0;
}

.thesis-sub {
  font-size: 0.9em;
  color: #333;
  line-height: 1.5;
}

/* ── Risks ── */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0.8em 0;
}

.risk-card {
  background: #fff;
  border: 1px solid #e3e8e5;
  border-top: 4px solid var(--danger);
  border-radius: 6px;
  padding: 0.8em 0.9em;
}

.risk-icon {
  font-size: 1.6em;
  font-weight: 900;
  color: var(--danger);
  line-height: 1;
  margin-bottom: 0.2em;
}

.risk-card h3 {
  color: var(--primary-dark);
  font-size: 0.95em;
  margin: 0.2em 0 0.3em 0;
}

.risk-card p {
  font-size: 0.75em;
  color: #444;
  margin: 0;
}

.risk-footer {
  font-size: 0.8em;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.6em;
}

/* ── Rollout stages ── */
.stage-flow {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 26px;
  margin-top: 0.6em;
}

.stage {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-soft);
  border-radius: 5px;
  padding: 0.55em 0.75em;
}

.stage-num {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage div strong {
  font-size: 0.85em;
  color: var(--primary-dark);
}

.stage div span {
  font-size: 0.72em;
  color: var(--muted);
}

.stage-final {
  background: #eaf7ef;
  border: 1px solid var(--primary);
}

/* ── Governing principle ── */
.principle {
  background: var(--bg-soft);
  border-left: 6px solid var(--primary);
  padding: 0.9em 1.1em;
  font-size: 1.0em;
  line-height: 1.55;
  border-radius: 4px;
}

.principle-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 0.9em;
}

.principle-col {
  border-radius: 6px;
  padding: 0.7em 0.9em;
  text-align: center;
}

.principle-col h3 {
  margin: 0 0 0.3em 0;
  font-size: 1.0em;
}

.principle-col p {
  font-size: 0.85em;
  margin: 0;
}

.principle-col.bad {
  background: #fdf0ee;
  border: 1px solid #e8c4bd;
}

.principle-col.bad h3 {
  color: var(--danger);
}

.principle-col.good {
  background: #eaf7ef;
  border: 1px solid var(--primary);
}

.principle-col.good h3 {
  color: var(--primary);
}

/* ── Research question ── */
.question-banner {
  background: #1a1a1a;
  color: #fff;
  padding: 0.7em 1em;
  border-radius: 6px;
  font-size: 0.95em;
  text-align: center;
  font-style: italic;
  margin-bottom: 0.8em;
}

.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.path {
  border-radius: 6px;
  padding: 0.7em 0.9em;
}

.path h3 {
  margin: 0 0 0.35em 0;
  font-size: 1.0em;
}

.path ul {
  margin: 0 0 0 1.1em;
}

.path li {
  font-size: 0.78em;
  margin: 0.25em 0;
}

.path-generic {
  background: #fdf0ee;
  border: 1px solid #e8c4bd;
}

.path-generic h3 {
  color: var(--danger);
}

.path-framed {
  background: #eaf7ef;
  border: 1px solid var(--primary);
}

.path-framed h3 {
  color: var(--primary);
}

/* ── Method ── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0.7em 0;
}

.method-item {
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 0.7em 0.5em;
  text-align: center;
}

.method-num {
  font-size: 2.1em;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.method-lbl {
  font-size: 0.78em;
  color: var(--primary-dark);
  margin-top: 0.25em;
  font-weight: 600;
}

.method-lbl span {
  display: block;
  font-size: 0.85em;
  color: var(--muted);
  font-weight: 400;
}

.method-note {
  font-size: 0.78em;
  color: #444;
  line-height: 1.5;
  background: #fff;
  border-left: 4px solid var(--primary-light);
  padding: 0.5em 0.8em;
}

/* ── Results ── */
.result-question {
  font-size: 0.9em;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5em;
}

.result-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.result-split.three {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.result-split.three .result-big {
  font-size: 2.8em;
}

/* ── Technical trace ── */
.trace-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.trace-col {
  border-radius: 8px;
  padding: 0.6em 0.7em;
}

.trace-col.framed {
  background: #eaf7ef;
  border: 2px solid var(--primary);
}

.trace-col.generic {
  background: #fdf0ee;
  border: 2px solid #e8c4bd;
}

.trace-head {
  font-size: 0.85em;
  font-weight: 700;
  margin-bottom: 0.3em;
  color: var(--primary-dark);
}

.trace-col pre {
  margin: 0;
  box-shadow: none;
}

/* The deck is shown over Discord screen share, so code must stay legible after
   image compression. Size is absolute because reveal.js stacks its own em
   multipliers on `pre` and `code`, which collapses the result to ~7px. */
.trace-col pre {
  font-size: 1em;
  width: 100%;
}

.trace-col pre code {
  font-size: 18px;
  line-height: 1.5;
  border-radius: 4px;
  max-height: none;
  padding: 0.9em 1.1em;
}

.trace-note {
  font-size: 0.72em;
  color: var(--muted);
  margin-top: 0.4em;
  font-style: italic;
}

/* ── Limitations ── */
.limits {
  margin-top: 0.5em;
}

.limits li {
  font-size: 0.82em;
  margin: 0.45em 0;
  line-height: 1.45;
}

.limits-footer {
  margin-top: 0.7em;
  padding: 0.55em 0.9em;
  background: #eaf7ef;
  border-left: 5px solid var(--primary);
  font-size: 0.85em;
}

/* ── Conclusion ── */
.conclusion-lead {
  font-size: 1.15em;
  background: var(--bg-soft);
  border-left: 6px solid var(--primary);
  padding: 0.7em 1em;
  border-radius: 4px;
  margin-bottom: 0.7em;
}

.conclusion-points div {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.88em;
  margin: 0.45em 0;
  line-height: 1.45;
}

.conclusion-points span {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Method slide: map beside the counts ── */
.method-layout {
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: 26px;
  align-items: center;
}

.reveal .method-layout img.method-map {
  width: 100%;
  max-width: none;
  margin: 0;
  border: none;
  box-shadow: none;
  background: none;
}

.method-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Field grid: one square per field ── */
.grid-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 34px;
  align-items: center;
  margin: 0.6em 0 0.5em 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(10, 30px);
  gap: 5px;
}

.field-grid .cell {
  width: 30px;
  height: 30px;
  border-radius: 4px;
}

.cell.zgodne { background: #d7e3dc; }
.cell.różne { background: var(--accent); }
.cell.przeciwne { background: var(--danger); }

.grid-legend {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}

.grid-stat {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.78em;
  color: var(--primary-dark);
}

.grid-num {
  font-size: 2.1em;
  font-weight: 900;
  line-height: 1;
  min-width: 1.6em;
  text-align: right;
}

.grid-num.zgodne { color: #7f9188; }
.grid-num.rozne { color: var(--accent); }
.grid-num.przeciwne { color: var(--danger); }

/* ── Confusion matrix ── */
.matrix-wrap {
  margin: 0.5em 0 0.6em 0;
}

.mx-axis-top {
  font-size: 0.68em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0.25em;
  letter-spacing: 0.5px;
}


.mx-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mx-row {
  display: grid;
  grid-template-columns: 8.5em repeat(3, 1fr) 5.4em 5.4em;
  gap: 5px;
  align-items: stretch;
}

/* Two matrices on one slide, so every vertical measure is tightened. */
.mx-block { margin-bottom: 0.35em; }

.mx-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8em;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.2em;
}

.mx-name span {
  font-size: 0.85em;
  font-weight: 700;
  color: var(--accent);
}

.mx-col-head,
.mx-row-head {
  font-size: 0.75em;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mx-row-head {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.mx-row-head span {
  font-size: 0.8em;
  font-weight: 400;
  color: var(--muted);
}

.mx-cell {
  background: #f4f6f5;
  border-radius: 5px;
  padding: 0.18em 0;
  text-align: center;
  font-size: 1.05em;
  font-weight: 800;
  color: #6b7a72;
}

.mx-cell.hit {
  background: #eaf7ef;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.mx-cell.heavy {
  background: #fdeae6;
  color: var(--danger);
}

.mx-cell.mx-acc {
  background: none;
  font-size: 1.0em;
  color: var(--primary-dark);
}

.mx-col-head.mx-acc {
  color: var(--muted);
}

/* ── Cross-validated F1 per crop ── */
.honest-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.honest-split h3 {
  font-size: 0.95em;
  color: var(--primary);
  margin: 0 0 0.5em 0;
}

.f1-row {
  display: grid;
  grid-template-columns: 8.4em 1fr 4.2em 4.4em 1.2em;
  align-items: center;
  gap: 9px;
  margin: 0.3em 0;
  font-size: 0.74em;
}

.f1-crop { color: var(--primary-dark); font-weight: 600; }

.f1-bar {
  height: 15px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 3px;
  overflow: hidden;
}

.f1-fill { height: 100%; background: var(--primary); border-radius: 3px; }

.f1-val { text-align: right; font-weight: 800; color: var(--primary-dark); }
.f1-std { text-align: right; color: var(--muted); font-size: 0.9em; }
.f1-ok { color: var(--primary); font-weight: 900; text-align: center; }

.f1-avg { border-top: 1px solid #dbe5df; padding-top: 0.35em; margin-top: 0.45em; }
.f1-avg .f1-crop { font-weight: 800; }

.f1-source {
  font-size: 0.62em;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 0.6em;
}

/* ── Where the language model sits: two-lane flow ── */
.flow { display: flex; flex-direction: column; gap: 14px; margin: 0.7em 0; }

.flow-lane {
  border-radius: 8px;
  padding: 0.6em 0.8em;
  display: grid;
  grid-template-columns: 6.2em 1fr;
  align-items: center;
  gap: 14px;
}

.lane-bad { background: #fdf0ee; border: 1px solid #e8c4bd; }
.lane-good { background: #eaf7ef; border: 1px solid var(--primary); }

.lane-tag {
  font-size: 0.78em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.lane-bad .lane-tag { color: var(--danger); }
.lane-good .lane-tag { color: var(--primary); }

.flow-steps { display: flex; align-items: stretch; gap: 8px; }

.node {
  background: #fff;
  border-radius: 6px;
  padding: 0.42em 0.6em;
  font-size: 0.7em;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
}

.node span {
  font-size: 0.85em;
  font-weight: 400;
  color: var(--muted);
}

/* The language model is the same component in both lanes - one colour for it
   everywhere, so the eye tracks what changed: its position, not its identity. */
.node-llm { border: 2px solid #7b8ea3; background: #f3f6f9; }
.node-core { border: 2px solid var(--primary); background: #eaf7ef; flex: 1; }
.node-out.bad { border: 2px dashed var(--danger); }
.node-out.good { border: 2px solid var(--primary); }

.arrow { display: flex; align-items: center; color: var(--muted); font-size: 0.9em; }

.flow-note {
  font-size: 0.78em;
  line-height: 1.5;
  background: var(--bg-soft);
  border-left: 4px solid var(--primary-light);
  padding: 0.5em 0.8em;
}

.trace-note.strong { color: var(--primary-dark); font-style: normal; }
