/* === Prezentacja konferencyjna: DSSAT + ML === */

/* Paleta FarmerPlanner (app.farmerplanner.com) */
:root {
  --primary: #1aa856;       /* FarmerPlanner green (#26d867 przyciemniony dla kontrastu na białym) */
  --primary-bright: #26d867; /* oryginalny primary z brandu */
  --primary-dark: #082a16;   /* ciemnozielony tekst na jasnym tle */
  --primary-light: #97bc62;
  --accent: #e67e22;
  --danger: #c0392b;
  --muted: #666;
  --bg-soft: #f2faf5;        /* delikatnie zielonkawy off-white */
}

/* Globalne tla i typografia */
/* Reveal.js domyslnie ma font-size 40px — zmniejszamy zeby tresc sie miescila */
.reveal {
  font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
  color: #1a1a1a;
  font-size: 28px;   /* baza — bylo ~40px */
}

.reveal .slides {
  text-align: left;
}

.reveal h1, .reveal h2, .reveal h3 {
  color: var(--primary);
  text-transform: none;
  letter-spacing: -0.5px;
  font-weight: 700;
}

.reveal h1 { font-size: 2.0em; }
.reveal h2 { font-size: 1.5em; margin-bottom: 0.3em; }
.reveal h3 { font-size: 1.15em; color: var(--primary-light); margin: 0.4em 0 0.2em 0; }

.reveal p, .reveal li {
  font-size: 0.85em;
  line-height: 1.4;
  margin: 0.3em 0;
}

.reveal ul, .reveal ol {
  margin-left: 1.2em;
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}

.reveal strong { color: var(--primary); }

/* Slajd tytulowy */
.slide-title {
  text-align: center !important;
  padding-top: 20px;
}

.slide-title .title-logo {
  max-width: 300px;
  width: auto;
  height: auto;
  margin: 0 auto 30px auto;
  display: block;
}

.slide-title h1 {
  font-size: 2.0em;
  margin-bottom: 0.3em;
}

/* Logo w lewym dolnym rogu — widoczne na wszystkich slajdach */
.brand-corner {
  position: fixed;
  bottom: 14px;
  left: 16px;
  z-index: 35;
  opacity: 0.7;
  transition: opacity 0.2s;
  text-decoration: none;
}

.brand-corner:hover { opacity: 1; }

.brand-corner img {
  height: 22px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.slide-title .subtitle {
  font-size: 1.1em;
  color: var(--muted);
  font-weight: 300;
}

.slide-title .authors {
  margin-top: 2em;
  font-size: 0.9em;
}

.slide-title .meta {
  margin-top: 3em;
  font-size: 0.75em;
  color: var(--muted);
}

/* Big number / kicker */
.kicker {
  font-size: 4.5em;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 0.1em 0;
}

.kicker.danger { color: var(--danger); }
.kicker.accent { color: var(--accent); }

.kicker-label {
  font-size: 1em;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Karty/cegly */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1em;
}

.card {
  background: var(--bg-soft);
  border-left: 4px solid var(--primary);
  padding: 15px;
  border-radius: 6px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 1em;
}

.card .big {
  font-size: 2em;
  font-weight: 700;
  color: var(--primary);
  margin: 5px 0;
}

.card p {
  font-size: 0.8em;
  color: var(--muted);
  margin: 5px 0;
}

/* Iframe pelnoekranowy dla mapy/wykresow */
/* Reveal.js ma wewnetrzny rozmiar 1280x800 px — wymiary w px, nie vh */
.full-iframe {
  width: 100%;
  height: 620px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.half-iframe {
  width: 100%;
  height: 420px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Slajd sam w sobie — zapobiega overflow */
.reveal .slides section {
  box-sizing: border-box;
  padding: 10px 0;
  max-height: 100%;
}

/* Kompaktowe naglowki zeby nie zjadaly miejsca */
.reveal h2 { margin-top: 0; margin-bottom: 0.4em; }
.reveal h3 { margin-top: 0.5em; margin-bottom: 0.3em; }

/* Kompaktowe listy */
.reveal ul li, .reveal ol li { margin-bottom: 0.2em; }
.reveal p { margin: 0.5em 0; }

/* Kod */
.reveal pre {
  font-size: 0.5em;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  max-height: 520px;
  margin: 0.3em 0;
}

.reveal code {
  font-family: 'SF Mono', Consolas, Monaco, monospace;
}

/* Tabele */
.reveal table {
  font-size: 0.75em;
  margin: 0.5em 0;
  border-collapse: collapse;
}

.reveal table th {
  background: var(--primary);
  color: white;
  padding: 8px 12px;
}

.reveal table td {
  padding: 6px 12px;
  border-bottom: 1px solid #eee;
}

.reveal table tr:nth-child(even) { background: var(--bg-soft); }

.badge-pass {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
}

/* Live demo */
.demo-panel {
  background: var(--bg-soft);
  padding: 25px;
  border-radius: 10px;
  margin-top: 1em;
}

.demo-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1em;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(44, 95, 45, 0.3);
}

.demo-button:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(44, 95, 45, 0.4);
}

.demo-button:disabled {
  background: #999;
  cursor: wait;
}

.demo-result {
  margin-top: 20px;
  padding: 20px;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 6px;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 0.75em;
  min-height: 60px;
  white-space: pre-wrap;
  word-break: break-word;
}

.demo-result.pending { color: var(--muted); }
.demo-result.success { border-color: var(--primary); }
.demo-result.error { border-color: var(--danger); color: var(--danger); }

.demo-class {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.3em;
  margin: 5px 0;
}

.demo-class.zwieksz { background: #fce4e4; color: var(--danger); }
.demo-class.utrzymaj { background: #e1f5fe; color: #1976d2; }
.demo-class.obniz { background: #e8f5e9; color: var(--primary); }

/* Footer dla slajdow — na dole, zawsze widoczny */
.slide-footer {
  position: absolute;
  bottom: 5px;
  right: 15px;
  font-size: 0.55em;
  color: var(--muted);
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.85);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Pipeline diagram */
.pipeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 1em 0;
}

.pipeline-step {
  flex: 1;
  background: var(--bg-soft);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid var(--primary-light);
}

.pipeline-step h4 {
  margin: 0 0 8px 0;
  color: var(--primary);
  font-size: 0.9em;
}

.pipeline-step p {
  margin: 0;
  font-size: 0.7em;
  color: var(--muted);
}

.pipeline-arrow {
  color: var(--primary);
  font-size: 1.5em;
  font-weight: bold;
}

/* === 15 scenariuszy walidacyjnych — 4 kolumny per uprawa ==================*/
.scenarios-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #2c5f2d 0%, #3a7d3a 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
}

.scenarios-num {
  font-size: 1.8em;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}
.scenarios-num small { font-size: 0.6em; opacity: 0.8; }

.scenarios-lbl {
  font-size: 0.7em;
  font-weight: 600;
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 0.3em;
}

.scen-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #fafafa;
  border-radius: 8px;
  padding: 6px;
}

.scen-col-head {
  color: white;
  font-weight: 700;
  font-size: 0.75em;
  padding: 5px 10px;
  border-radius: 5px;
  text-align: center;
}

.scen-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: white;
  padding: 6px 8px;
  border-radius: 5px;
  border-left: 3px solid #27ae60;  /* zielony = PASS */
  font-size: 0.58em;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.scen-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.9em;
  flex-shrink: 0;
}

.scen-klasa {
  display: inline-block;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 2px;
}

.scen-klasa.zwieksz { background: #fce4e4; color: #c0392b; }
.scen-klasa.utrzymaj { background: #e1f5fe; color: #1976d2; }
.scen-klasa.obniz { background: #e8f5e9; color: #27ae60; }

.scen-item small {
  color: var(--muted);
  font-weight: 400;
}

/* === Monotoniczność (sweep N per scenariusz) ============================ */
.mono-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 0.2em;
}

.mono-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fafafa;
  border-radius: 8px;
  padding: 6px;
}

.mono-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 5px 7px;
  border-radius: 5px;
  border-left: 3px solid #27ae60;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mono-label {
  font-size: 0.55em;
  line-height: 1.2;
  color: #1a1a1a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mono-bar {
  display: flex;
  gap: 1px;
  background: #ddd;
  padding: 1px;
  border-radius: 3px;
}

.mono-bar i {
  display: block;
  width: 10px;
  height: 14px;
  border-radius: 1px;
}

.mono-bar i.z { background: #e74c3c; }   /* zwiększ */
.mono-bar i.u { background: #3498db; }   /* utrzymaj */
.mono-bar i.o { background: #27ae60; }   /* obniż */

.mono-opt {
  font-size: 0.52em;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.mono-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.9em;
}
.mono-chip.zwieksz { background: #e74c3c; color: white; }
.mono-chip.utrzymaj { background: #3498db; color: white; }
.mono-chip.obniz { background: #27ae60; color: white; }

/* === Scenariusze nawożenia (M0/M1/M2/M3) ==================================*/
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0.4em 0;
}

.scenario-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.scenario-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.scenario-badge {
  background: #95a5a6;
  color: white;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  letter-spacing: 0.5px;
}

.scenario-badge.m1 { background: #3498db; }
.scenario-badge.m2 { background: #e67e22; }
.scenario-badge.m3 { background: #8e44ad; }

.scenario-name {
  font-size: 0.8em;
  font-weight: 700;
  color: var(--primary);
}

.scenario-body {
  font-size: 0.62em;
  color: #1a1a1a;
  line-height: 1.45;
  flex: 1;
}

.scenario-body small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9em;
}

.scenario-count {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e5e5e5;
  font-size: 0.62em;
  color: var(--muted);
  text-align: right;
  font-weight: 600;
}

/* === Soil parameters grid — przyjazna wizualizacja ICASA-Dictionary =========*/
.soil-params-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 0.4em 0;
}

.soil-param {
  background: white;
  border: 1px solid #e5e5e5;
  border-top: 3px solid var(--primary-light);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.15s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.soil-param:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.soil-param-icon {
  font-size: 1.5em;
  line-height: 1;
}

.soil-param-val {
  font-size: 1.3em;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.soil-param-name {
  font-size: 0.58em;
  font-weight: 700;
  color: #1a1a1a;
}

.soil-param-desc {
  font-size: 0.5em;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}

/* === Dialog grid (Dylemat rolnika) =========================================*/
.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-top: 0.5em;
}

.dialog-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85em;
}

.dialog-header.farmer {
  background: #fff6d5;
  color: #8c6d00;
}

.dialog-header.ai {
  background: var(--bg-soft);
  color: var(--primary);
}

.dialog-avatar {
  font-size: 1.4em;
  line-height: 1;
}

.dialog-bubble {
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.68em;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.dialog-bubble.farmer {
  background: #fffbe6;
  border-left: 3px solid #f0c040;
  color: #5d3f00;
  font-style: italic;
}

.dialog-bubble.ai {
  background: white;
  border-left: 3px solid var(--primary);
  color: #1a1a1a;
}

.dialog-bubble.ai b { color: var(--primary); }

/* === CO2 breakdown components ==============================================*/
.co2-component {
  background: white;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  flex: 1;
  line-height: 1.4;
}

.co2-component b { color: var(--primary); }

/* === Use case CO2 — gamified quest =========================================*/
.usecase-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  margin: 0.3em 0;
}

/* Lewa: karta pola */
.usecase-field {
  background: linear-gradient(135deg, #2c5f2d 0%, #3a7d3a 100%);
  border-radius: 12px;
  padding: 16px 14px;
  color: white;
  box-shadow: 0 6px 20px rgba(44, 95, 45, 0.3);
  position: relative;
  overflow: hidden;
}

.usecase-field::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.usecase-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.usecase-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7em;
  font-weight: 600;
}

.usecase-region {
  font-size: 0.7em;
  opacity: 0.9;
}

.usecase-field-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: relative;
  z-index: 1;
}

.usecase-stat {
  text-align: center;
  padding: 8px 4px;
}

.usecase-stat-val {
  font-size: 1.8em;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.usecase-stat-val.usecase-class {
  font-size: 1.3em;
  color: #ffd166;  /* złoto — rekomendacja "obniż" */
}

.usecase-stat-lbl {
  font-size: 0.55em;
  opacity: 0.85;
  margin-top: 4px;
  line-height: 1.3;
}

/* Prawa: kroki obliczeń */
.usecase-calc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usecase-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid #eaeaea;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.usecase-step-num {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95em;
}

.usecase-step-body {
  font-size: 0.7em;
  line-height: 1.5;
  flex: 1;
}

.usecase-step-body b { color: var(--primary); }

.usecase-step .highlight {
  display: inline-block;
  background: #fff6d5;
  color: #8c6d00;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
}

/* Achievement — złoty badge z efektem glow */
.usecase-achievement {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 0.5em;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ffd166 0%, #ffb84d 100%);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(255, 184, 77, 0.4), 0 0 40px rgba(255, 209, 102, 0.2);
  animation: achievement-glow 2s ease-in-out infinite alternate;
}

@keyframes achievement-glow {
  from { box-shadow: 0 6px 20px rgba(255, 184, 77, 0.4), 0 0 40px rgba(255, 209, 102, 0.2); }
  to   { box-shadow: 0 6px 25px rgba(255, 184, 77, 0.6), 0 0 60px rgba(255, 209, 102, 0.4); }
}

.usecase-trophy {
  font-size: 2.5em;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.usecase-award {
  flex: 1;
  color: #5d3f00;
}

.usecase-award-big {
  font-size: 1.5em;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.usecase-award-equiv {
  font-size: 0.65em;
  margin-top: 4px;
  color: #7a4b00;
}

.usecase-award-equiv b { color: #5d3f00; font-weight: 800; }

/* === Puzzle grid (Live demo) ============================================== */
.puzzle-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 0.55em;
}

.puzzle-legend { display: flex; gap: 8px; }
.puzzle-chip {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f5f5f5;
}
.puzzle-chip.obniz { color: #27ae60; }
.puzzle-chip.utrzymaj { color: #3498db; }
.puzzle-chip.zwieksz { color: #e74c3c; }
.puzzle-chip.unknown { color: var(--muted); }

.puzzle-counter {
  color: #1a1a1a;
  font-weight: 500;
}

.puzzle-btn-all {
  margin-left: 10px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 600;
}
.puzzle-btn-all:hover { background: var(--primary-light); }
.puzzle-btn-all:disabled { background: #999; cursor: wait; }

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 4px;
  width: 100%;
  height: 520px;
  perspective: 600px;
}

.puzzle-card {
  position: relative;
  border-radius: 5px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  will-change: transform;
}

.puzzle-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.puzzle-front {
  background: white;
  border-left: 3px solid var(--crop-color, #666);
  border-top: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  flex-direction: column;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.puzzle-card:hover .puzzle-front {
  transform: scale(1.02);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.puzzle-icon { font-size: 0.85em; line-height: 1; margin-bottom: 1px; }
.puzzle-meta { font-size: 0.38em; line-height: 1.15; color: #1a1a1a; }
.puzzle-region { font-weight: 700; color: var(--crop-color); }
.puzzle-details { color: #666; font-size: 0.9em; }

.puzzle-back {
  transform: rotateY(180deg);
  flex-direction: column;
  color: white;
  font-weight: 700;
}

.puzzle-card.done { transform: rotateY(180deg); }
.puzzle-card.done.result-obniz .puzzle-back { background: #27ae60; }
.puzzle-card.done.result-utrzymaj .puzzle-back { background: #3498db; }
.puzzle-card.done.result-zwieksz .puzzle-back { background: #e74c3c; }

.puzzle-result-klasa { font-size: 0.45em; letter-spacing: 0.5px; }
.puzzle-result-conf { font-size: 0.6em; opacity: 0.95; margin-top: 1px; }

.puzzle-card.loading .puzzle-front {
  background: #f5f8f3;
  animation: puzzle-pulse 0.8s infinite;
}

.puzzle-card.error .puzzle-front { background: #ffe5e5; border-left-color: #c0392b; }

@keyframes puzzle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Soil cards — 4 kontrastujace profile glebowe */
.soil-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0.5em 0;
}

.soil-card {
  background: var(--bg-soft);
  border: 1px solid #ddd;
  border-top: 4px solid var(--primary);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.soil-card h3 {
  font-size: 0.95em;
  margin: 4px 0 2px 0;
  color: var(--primary);
}

.soil-icon {
  font-size: 1.8em;
  line-height: 1;
  text-align: center;
}

.soil-loc {
  font-size: 0.6em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 6px;
}

.soil-loc small {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 1em;
}

.soil-params {
  background: white;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 0.7em;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  text-align: center;
}

.soil-note {
  background: white;
  border-left: 3px solid var(--primary);
  padding: 6px 8px;
  font-size: 0.6em;
  line-height: 1.3;
  flex: 1;
}

.soil-note.danger { border-left-color: #c0392b; }
.soil-note.warn { border-left-color: #e67e22; }
.soil-note.good { border-left-color: #27ae60; }

/* Math grid — wizualna kalkulacja "skad 61 200 symulacji" */
.math-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 0.8em 0;
}

.math-step {
  background: var(--bg-soft);
  border: 2px solid var(--primary-light);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.math-icon {
  font-size: 2em;
  line-height: 1;
  margin-bottom: 4px;
}

.math-value {
  font-size: 2.3em;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 3px 0;
}

.math-label {
  font-size: 0.65em;
  color: #1a1a1a;
  font-weight: 600;
}

.math-label small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85em;
  margin-top: 3px;
}

.math-op {
  font-size: 2em;
  font-weight: 700;
  color: var(--primary-light);
  text-align: center;
}

.math-result {
  margin-top: 0.6em;
  padding: 12px 20px;
  background: linear-gradient(135deg, #2c5f2d 0%, #3a7d3a 100%);
  color: white;
  border-radius: 10px;
  text-align: center;
}

.math-equation {
  font-size: 1.1em;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.math-equation .eq {
  font-size: 1.3em;
  margin: 0 6px;
  opacity: 0.8;
}

.math-total {
  font-size: 1.6em;
  font-weight: 900;
  letter-spacing: -1px;
}

.math-time {
  margin-top: 0.3em;
}

/* Stats row */
.stats {
  display: flex;
  justify-content: space-around;
  margin: 1em 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2em;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8em;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
}

/* Ukrycie paska progressu */
.reveal .progress {
  color: var(--primary);
}

.reveal .controls {
  color: var(--primary);
}

/* === Slajd trzech analogii (duch Feynmana) =============================== */
.analogy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 0.5em;
}

.analogy-card {
  background: #fafafa;
  border-top: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}

.analogy-icon {
  font-size: 2.4em;
  line-height: 1;
  margin-bottom: 6px;
}

.analogy-card h3 {
  font-size: 0.85em;
  color: var(--primary);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analogy-lead {
  font-size: 0.95em;
  font-weight: 600;
  color: #1a1a1a;
  margin: 6px 0 10px 0;
  line-height: 1.35;
}

.analogy-body {
  font-size: 0.68em;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.analogy-footer {
  margin-top: 0.7em;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f5f8f3 0%, #e8f0e5 100%);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  font-size: 0.75em;
  line-height: 1.5;
}

/* Porównanie czasu eksperymentu polowego vs symulacji (slajd 61 200) */
.time-compare {
  margin-top: 0.8em;
  text-align: center;
}

.time-compare-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-size: 1.4em;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tc-count { color: var(--primary); }
.tc-eq    { color: var(--primary-light); }
.tc-field { color: #d35400; }
.tc-in    { color: var(--muted); font-weight: 400; font-size: 0.8em; }
.tc-sim   { color: var(--primary); }

/* === Live demo sweep (selektory + pasek klas) ========================== */
.demo-selectors {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.demo-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.7em;
}

.demo-field > span {
  color: var(--muted);
  font-weight: 600;
}

.demo-field select {
  font: inherit;
  font-size: 1em;
  padding: 6px 10px;
  border: 2px solid var(--primary-light);
  border-radius: 6px;
  background: white;
  min-width: 180px;
  cursor: pointer;
}

.demo-field select:focus {
  outline: none;
  border-color: var(--primary);
}

.demo-sweep-result {
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.72em;
  line-height: 1.4;
  min-height: 60px;
}

.demo-sweep-result.pending  { background: #f5f5f5; color: var(--muted); text-align: center; }
.demo-sweep-result.success  { background: #f5f8f3; border-left: 4px solid var(--primary); }
.demo-sweep-result.error    { background: #fdeeee; border-left: 4px solid #c0392b; color: #c0392b; font-family: monospace; }

.demo-sweep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.demo-sweep-meta {
  font-size: 0.85em;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}

.demo-n-opt {
  text-align: right;
  line-height: 1.2;
}

.demo-n-opt-lbl {
  font-size: 0.75em;
  color: var(--muted);
}

.demo-n-opt-val {
  font-size: 1.3em;
  color: var(--primary);
  font-weight: 800;
}

.sweep-bar {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
  margin: 10px 0;
}

.sweep-cell {
  padding: 6px 4px;
  text-align: center;
  color: white;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.2;
}

.sweep-cell-n      { font-size: 1em; }
.sweep-cell-klasa  { font-size: 0.78em; opacity: 0.92; margin-top: 2px; }

.sweep-cell.sweep-zwieksz  { background: #e74c3c; }
.sweep-cell.sweep-utrzymaj { background: #3498db; }
.sweep-cell.sweep-obniz    { background: #27ae60; }

.demo-sweep-footer {
  text-align: right;
  font-size: 0.82em;
  color: var(--muted);
  margin-top: 4px;
}

/* Wyjaśnienie F1 w duchu Feynmana — pod wykresem na slajdzie Model klasyfikacyjny */
.f1-feynman {
  margin-top: 0.6em;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #f5f8f3 0%, #e8f0e5 100%);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
}

.f1-feynman-icon {
  font-size: 1.8em;
  line-height: 1;
  flex-shrink: 0;
}

.f1-feynman-body {
  font-size: 0.72em;
  line-height: 1.5;
  color: #1a1a1a;
}

/* Cytat zamykający — w podsumowaniu */
.closing-tagline {
  max-width: 820px;
  margin: 1em auto 0;
  padding: 14px 24px;
  text-align: center;
  font-size: 0.82em;
  line-height: 1.5;
  font-style: italic;
  color: #1a1a1a;
  background: linear-gradient(135deg, #f5f8f3 0%, #e8f0e5 100%);
  border-left: 4px solid var(--primary);
  border-right: 4px solid var(--primary);
  border-radius: 6px;
}
