/* Obavy a motivace – slides for a projector (obavy_motivace.php, 00-materials/2026_10_26-obvay_motivace.md).
   Builds on style.css (colours, brand, buttons). A slide is a 16:9 card whose type scales with
   its width (container units), so it reads the same on a laptop and a projector. Narrow screens
   and pages without JavaScript show the slides one under another. */

.slides-page {
  --theme: var(--green);
  --theme-ink: #3f6e14;
  --theme-soft: var(--soft-green);
}
.theme-ai { --theme: #88c53f; --theme-ink: #3f6e14; --theme-soft: #edf6e3; }
.theme-demand { --theme: #4b9ad6; --theme-ink: #1d5c8c; --theme-soft: #e8f2fb; }
.theme-skills { --theme: #896bb3; --theme-ink: #573b80; --theme-soft: #f1ecf8; }
.theme-fears { --theme: #e7962b; --theme-ink: #8a5000; --theme-soft: #fdf2e2; }
.theme-jobs { --theme: #2f9c97; --theme-ink: #17615e; --theme-soft: #e4f3f2; }
.theme-learn { --theme: #5a7fe0; --theme-ink: #2a4ea3; --theme-soft: #ebf0fd; }
.theme-career { --theme: #d9618f; --theme-ink: #922c55; --theme-soft: #fbe9f1; }

.deck-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(246,247,243,.94);
}
.deck-heading {
  flex: 1;
  margin: 0;
  font-weight: 700;
  color: var(--muted);
  min-width: 0;
}
.deck-back {
  flex: 0 0 auto;
}

/* ---- one slide ---- */
.slide {
  position: relative;
  container-type: inline-size;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 3.4cqw 4cqw 2.4cqw 4.6cqw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.slide::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1cqw;
  background: var(--theme);
}
.slide:focus,
.slide:focus-visible {
  outline: none;
}
.slide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  font-size: 1.55cqw;
  font-weight: 800;
}
.slide-theme {
  padding: .5cqw 1.3cqw;
  border-radius: 999px;
  background: var(--theme-soft);
  color: var(--theme-ink);
}
.slide-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr);
  gap: 4cqw;
  align-items: center;
}
.slide-figure {
  display: flex;
  flex-direction: column;
  gap: 2.4cqw;
}
.figure-item {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.slide-number {
  font-size: 11.5cqw;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .95;
  color: var(--theme-ink);
}
.figure-item.is-second .slide-number {
  font-size: 7cqw;
  opacity: .85;
}
.slide-unit {
  margin-top: .8cqw;
  font-size: 2.1cqw;
  font-weight: 700;
  line-height: 1.25;
  max-width: 28ch;
}
.figure-item.is-second .slide-unit {
  font-size: 1.8cqw;
}
.slide-text .slide-title {
  margin: 0 0 1.6cqw;
  font-size: 3.7cqw;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}
.slide-comment {
  margin: 0 0 1.6cqw;
  font-size: 2.05cqw;
  line-height: 1.42;
}
.slide-comment strong {
  color: var(--theme-ink);
}
.slide-caveat {
  margin: 0;
  font-size: 1.5cqw;
  line-height: 1.35;
  color: var(--muted);
}
.slide-source {
  margin-top: 1.4cqw;
  padding-top: 1.1cqw;
  border-top: 1px solid var(--line);
  font-size: 1.4cqw;
  color: var(--muted);
}
.slide-source a {
  color: var(--theme-ink);
  font-weight: 700;
}

/* bars: lengths from data-value, set by slides.js */
.slide-chart {
  margin: 0;
}
.slide-chart figcaption {
  margin-bottom: 1.6cqw;
  font-size: 1.6cqw;
  font-weight: 700;
  color: var(--muted);
}
.bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1cqw;
}
.bars li {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.5fr) 7.5cqw;
  align-items: center;
  gap: 1.2cqw;
  font-size: 1.55cqw;
}
.bar-track {
  position: relative;
  height: 2.3cqw;
  border-radius: 999px;
  background: #eef1ec;
  overflow: hidden;
}
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: var(--theme);
  opacity: .55;
  transition: width .5s ease;
}
.bars li.is-highlight {
  font-weight: 800;
}
.bars li.is-highlight .bar-fill {
  opacity: 1;
}
.bars li.is-negative .bar-fill {
  background: #c9cfc6;
  opacity: 1;
}
.bar-value {
  font-weight: 800;
  color: var(--theme-ink);
  font-size: 1.9cqw;
  text-align: right;
  white-space: nowrap;
}
.bars li.is-negative .bar-value {
  color: var(--muted);
}

/* title and closing slides */
.slide-kind-title,
.slide-kind-closing {
  justify-content: center;
}
.slide-kicker {
  margin: 0 0 1.2cqw;
  font-size: 1.7cqw;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #4e7d1e;
}
.slide-kind-title .slide-title,
.slide-kind-closing .slide-title {
  margin: 0 0 1.6cqw;
  font-size: 7.2cqw;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.02;
  max-width: 16ch;
}
.slide-kind-closing .slide-title {
  font-size: 5.6cqw;
  max-width: 20ch;
}
.slide-subtitle {
  margin: 0 0 2cqw;
  font-size: 3cqw;
  font-weight: 700;
  line-height: 1.25;
  color: #3f6e14;
  max-width: 34ch;
}
.slide-lead {
  margin: 0 0 2cqw;
  font-size: 2.1cqw;
  line-height: 1.4;
  max-width: 52ch;
}
.slide-hint {
  margin: 1cqw 0 0;
  font-size: 1.45cqw;
  color: var(--muted);
}
.slide-hint kbd {
  font: inherit;
  font-weight: 800;
  padding: 0 .4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}
.slide-kind-closing .button-large {
  font-size: 2cqw;
}
/* title and closing: the message on the left, numbers (links to their slides) or steps on the right */
.slide-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 4cqw;
  align-items: center;
}
.teaser {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 1cqw;
}
.teaser li {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
}
.teaser a {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  gap: 1.4cqw;
  padding: .9cqw 1.4cqw;
  border: 1px solid var(--line);
  border-left: .6cqw solid var(--theme);
  border-radius: 1.2cqw;
  background: var(--white);
  color: inherit;
  text-decoration: none;
  font-size: 1.55cqw;
  line-height: 1.25;
}
.teaser a:hover, .teaser a:focus-visible {
  background: var(--theme-soft);
}
.teaser b {
  font-size: 3cqw;
  letter-spacing: -.03em;
  color: var(--theme-ink);
  white-space: nowrap;
}
.slide-kind-title .slide-split .slide-title {
  font-size: 6.4cqw;
}
.slide-steps {
  padding: 2cqw 2.2cqw;
  border-radius: 1.6cqw;
  background: var(--soft-green);
  border: 1px solid #cfe3b8;
}
.slide-steps-title {
  margin: 0 0 1.2cqw;
  font-size: 1.9cqw;
  font-weight: 800;
  color: #3f6e14;
}
.slide-steps ol {
  margin: 0;
  padding-left: 2.6cqw;
  display: grid;
  gap: .8cqw;
  font-size: 1.6cqw;
  line-height: 1.35;
}
.slide-steps li::marker {
  font-weight: 800;
  color: #3f6e14;
}
.slide-kind-closing .slide-title {
  font-size: 4.6cqw;
}
.slide-kind-closing .slide-subtitle {
  font-size: 2.3cqw;
}

/* ---- slide mode (JavaScript): one 16:9 slide fitted into the window ---- */
html.js .slides-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.js .deck {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px 22px 6px;
}
html.js .slide {
  width: min(100%, calc((100dvh - 166px) * 16 / 9));
  aspect-ratio: 16 / 9;
}
html.js .slide[hidden] {
  display: none;
}
.deck-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 22px 12px;
  transition: opacity .3s ease;
}
.deck-controls[hidden] {
  display: none;
}
.deck-button {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}
.deck-button:hover:not(:disabled) {
  border-color: var(--ink);
}
.deck-button:disabled {
  opacity: .35;
  cursor: default;
}
.deck-text-button {
  padding: 0 14px;
  font-size: 14px;
}
.deck-status {
  margin: 0;
  min-width: 15ch;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.deck-status b {
  color: var(--ink);
}
/* progress: one line right under the slide, as wide as the slide */
.deck-progress {
  width: min(calc(100% - 44px), calc((100dvh - 166px) * 16 / 9));
  height: 6px;
  margin: 2px auto 0;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.deck-progress[hidden] {
  display: none;
}
#deckProgressBar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--green);
  transition: width .25s ease;
}

/* full screen for the projector */
body.is-fullscreen .deck-header {
  display: none;
}
html.js body.is-fullscreen .slide {
  width: min(100%, calc((100dvh - 96px) * 16 / 9));
}
body.is-fullscreen .deck-progress {
  width: min(calc(100% - 44px), calc((100dvh - 96px) * 16 / 9));
}
body.is-fullscreen.controls-idle .deck-controls {
  opacity: 0;
}
body.controls-idle {
  cursor: none;
}

/* overview of all slides */
.overview {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: auto;
  padding: 22px;
  background: rgba(246,247,243,.98);
}
.overview[hidden] {
  display: none;
}
.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto 14px;
}
.overview-head h2 {
  margin: 0;
}
.overview-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1280px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.overview-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: inherit;
  text-decoration: none;
}
.overview-card:hover, .overview-card:focus-visible {
  border-color: var(--ink);
}
.overview-card.is-current {
  box-shadow: 0 0 0 3px var(--blue);
}
.overview-no, .overview-theme {
  font-size: 12px;
  color: var(--muted);
}
.overview-figure {
  font-size: 24px;
  letter-spacing: -.03em;
}
.overview-title {
  font-weight: 700;
  line-height: 1.3;
}

/* ---- narrow or portrait screens and pages without JavaScript: slides one under another ---- */
html:not(.js) .deck {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  gap: 18px;
}
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  html.js .slides-page {
    height: auto;
    overflow: visible;
  }
  html.js .deck {
    display: block;
    padding: 12px;
  }
  html.js .slide {
    width: 100%;
    aspect-ratio: auto;
  }
  .deck-header {
    padding: 8px 12px;
    gap: 10px;
  }
  .deck-heading {
    display: none;
  }
  .deck-back {
    margin-left: auto;
  }
  .deck-controls {
    position: sticky;
    bottom: 0;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px 12px;
    background: rgba(246,247,243,.96);
    border-top: 1px solid var(--line);
  }
  .deck-progress {
    width: calc(100% - 24px);
    margin-top: 0;
  }
  #deckFullscreen {
    display: none;
  }
  .slide {
    padding: 18px 16px 14px 22px;
    border-radius: 16px;
  }
  .slide::before {
    width: 6px;
  }
  .slide-head {
    font-size: 13px;
  }
  .slide-theme {
    padding: 3px 10px;
  }
  .slide-body {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 12px;
  }
  .slide-figure {
    gap: 10px;
  }
  .slide-number {
    font-size: 54px;
  }
  .figure-item.is-second .slide-number {
    font-size: 38px;
  }
  .slide-unit, .figure-item.is-second .slide-unit {
    font-size: 15px;
    margin-top: 4px;
  }
  .slide-text .slide-title {
    font-size: 24px;
    margin-bottom: 8px;
  }
  .slide-comment {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .slide-caveat {
    font-size: 13px;
  }
  .slide-source {
    font-size: 12px;
    margin-top: 12px;
    padding-top: 8px;
  }
  .slide-chart figcaption {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .bars {
    gap: 8px;
  }
  .bars li {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 4.2em;
    gap: 8px;
    font-size: 13px;
  }
  .bar-track {
    height: 14px;
  }
  .bar-value {
    font-size: 14px;
  }
  .slide-kicker {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .slide-kind-title .slide-title, .slide-kind-closing .slide-title {
    font-size: 34px;
  }
  .slide-subtitle {
    font-size: 19px;
    margin-bottom: 10px;
  }
  .slide-lead {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .slide-hint {
    display: none;
  }
  .slide-kind-closing .button-large {
    font-size: 17px;
  }
  .slide-split {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .teaser {
    gap: 6px;
  }
  .teaser a {
    gap: 8px;
    padding: 6px 10px;
    border-left-width: 4px;
    border-radius: 10px;
    font-size: 13px;
  }
  .teaser b {
    font-size: 18px;
  }
  .slide-steps {
    padding: 12px 14px;
    border-radius: 12px;
  }
  .slide-steps-title {
    font-size: 15px;
    margin-bottom: 6px;
  }
  .slide-steps ol {
    padding-left: 20px;
    gap: 6px;
    font-size: 14px;
  }
  .slide-kind-closing .slide-subtitle {
    font-size: 17px;
  }
  .slide-kind-title .slide-split .slide-title {
    font-size: 34px;
  }
}

@media print {
  .deck-header, .deck-controls, .deck-progress, .overview {
    display: none !important;
  }
  html.js .slides-page {
    height: auto;
    overflow: visible;
    display: block;
  }
  html.js .deck {
    display: block;
    padding: 0;
  }
  html.js .slide, html.js .slide[hidden] {
    display: flex;
    width: 100%;
    box-shadow: none;
    break-after: page;
  }
}
