:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --white: #fff;
  --ink: #142b2a;
  --muted: #415855;
  --green: #006a55;
  --rust: #a54027;
  --navy: #20579a;
  --night: #153832;
  --mint: #9ce9cc;
  --soft: #c4dbd2;
  --outline: #a5bdb4;
  --focus: #155ce3;
  --gutter: clamp(.85rem, 3.2vw, 2.6rem);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: #eaf1ee;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.slide-dark :focus-visible { outline-color: var(--mint); }

.wrap { width: min(100% - var(--gutter) * 2, 75rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  z-index: 1;
  inset: .6rem auto auto .6rem;
  padding: .6rem .9rem;
  background: var(--white);
}
.masthead { background: var(--white); border-block-end: 1px solid #d5e0dc; }
.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 3.8rem;
  gap: .25rem 1rem;
  padding-block: .35rem;
}
.brand { display: inline-flex; gap: .65rem; align-items: center; text-decoration: none; font-weight: 720; }
.brand img { width: 5.3rem; height: auto; }
.brand span { padding-inline-start: .65rem; border-inline-start: 1px solid var(--outline); }
.site-links { display: flex; flex-wrap: wrap; column-gap: 1rem; color: var(--muted); font-weight: 650; }
.site-links a, .media a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: .22em; }
.site-links a { text-decoration: none; }
.site-links a:hover, .media a:hover { color: var(--green); text-decoration: underline; }

.navigation, .presentation-footer, .controls, .media {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .45rem .8rem;
}
.navigation { padding-block: .75rem; }
.slide-index {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.slide-index a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--outline);
  border-radius: .55rem;
  text-decoration: none;
  background: var(--white);
  font-weight: 700;
}
.slide-index a:hover, .button-outline:hover { background: #dcece4; }
.slide-index a[aria-current="true"] { border-color: var(--green); color: var(--white); background: var(--green); }

.slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(.9rem, 2.15vw, 1.85rem);
  min-height: clamp(24rem, 55vh, 37rem);
  padding: clamp(1.05rem, 3.4vw, 3.25rem);
  border-radius: .95rem;
  background: var(--paper);
  border: 1px solid #e1e3d8;
  scroll-margin-block-start: .85rem;
}
html:not([data-deck]) .slide + .slide { margin-block-start: 1rem; }
.slide-dark { background: var(--night); color: var(--white); border-color: var(--night); }
.slide h2, .slide h3, .slide p, .slide dl { margin: 0; }
.slide h2 {
  font-size: clamp(1.8rem, 4.12vw, 3.45rem);
  line-height: 1.1;
  letter-spacing: -.033em;
}
.slide:not(.slide-cover) h2 { padding-block-end: .48em; border-block-end: 1px solid var(--outline); }
.slide-cover h2 { font-size: clamp(2.5rem, 7vw, 6.05rem); line-height: .97; letter-spacing: -.055em; }
.slide p, .slide dd, .exercise span { font-size: clamp(1rem, 1.85vw, 1.52rem); text-wrap: pretty; }
.slide-cover .lead { margin-block-start: .9rem; }
.slide-dark p { color: var(--soft); }
.slide-dark .takeaway { margin-block-start: .85rem; color: var(--mint); font-weight: 700; }
.slide-dark .emphasis {
  margin-block-end: .7rem;
  font-size: clamp(1.28rem, 2.65vw, 2.25rem);
  line-height: 1.18;
  font-weight: 730;
  color: var(--white);
}
.split, .compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(.8rem, 2.7vw, 2rem);
}
.slide img { display: block; max-width: 100%; height: auto; }
.cover-figure, .arm-figure, .safety-figure { margin-inline: auto; object-fit: contain; }
.cover-figure { max-height: min(23rem, 48vh); width: auto; }
.arm-figure, .safety-figure { max-height: min(19rem, 40vh); width: auto; }
.safety-figure { border-radius: .5rem; }
.key-terms { display: grid; gap: clamp(.6rem, 2.6vw, 1.65rem); }
.key-terms dt { color: var(--green); font-size: clamp(1.15rem, 2.25vw, 1.75rem); font-weight: 720; }
.key-terms div + div dt { color: var(--rust); }
.key-terms dd { margin: .15rem 0 0; }

.compare { align-items: stretch; }
.example {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: .42rem;
  min-width: 0;
  background: #e6f1eb;
  border-radius: .6rem;
  padding: clamp(.8rem, 1.9vw, 1.45rem);
}
.example-joint { background: #e8eef7; }
.example-vacuum { background: #f5e9e0; }
.example h3 { font-size: clamp(1.23rem, 2.45vw, 1.85rem); line-height: 1.15; }
.example-joint h3 { color: var(--navy); }
.path-figure, .tool-figure { justify-self: center; object-fit: contain; }
.path-figure { max-height: 10rem; }
.tool-figure { max-height: 8.5rem; }

.exercise {
  display: grid;
  gap: .9rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.exercise li {
  display: grid;
  grid-template-columns: minmax(7.5rem, .34fr) minmax(0, 1fr);
  gap: .18rem 1rem;
  align-items: baseline;
  padding-inline-start: .9rem;
  border-inline-start: .24rem solid var(--green);
}
.exercise li:last-child { border-color: var(--rust); }
.exercise strong { font-size: clamp(1.07rem, 2vw, 1.56rem); }
.exercise-action { align-self: flex-start; }

.presentation-footer { padding-block: .75rem 1rem; }
.slide-count { min-width: 3.2rem; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.media a { font-size: .9rem; font-weight: 650; }
.media audio { max-width: 100%; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .27rem;
  padding: .48rem .73rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
}
.button-outline { color: var(--ink); background: var(--white); border-color: var(--outline); }
.button-primary { background: var(--green); color: var(--white); }
.button-primary:hover { background: #005241; }
.button:disabled, .button:disabled:hover {
  color: #596965;
  background: #e1e8e4;
  border-color: var(--outline);
  cursor: default;
}

@media (max-width: 38rem) {
  .split, .compare { grid-template-columns: minmax(0, 1fr); }
  .slide { min-height: 0; }
  .exercise li { grid-template-columns: minmax(0, 1fr); }
  .presentation-footer, .controls { justify-content: flex-start; }
}

@media (max-width: 25rem) {
  .masthead-inner { justify-content: flex-start; }
  .navigation { gap: .45rem; }
  .slide-index { column-gap: .24rem; }
}

#lesson-film { display: block; width: 100%; max-height: 68vh; background: #102925; border-radius: .75rem; }
#return-slide { margin-top: .5rem; }

@media print {
  #film { display: none; }
  #snimky[hidden] { display: block !important; }
  .masthead, .navigation, .presentation-footer { display: none; }
  .wrap { width: 100%; }
  .slide, .slide[hidden] {
    display: flex !important;
    break-after: page;
    print-color-adjust: exact;
  }
}
