/* The slide library mirrors the course's eight-module sequence. Each deck is
   a direct action, while the module header preserves its pedagogical context. */

.wh-slides-page #title-block-header,
.wh-slides-page section.level1 > h1:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wh-slides-page main.content {
  padding-top: 1.4rem;
}

.wh-slides-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.28fr);
  overflow: hidden;
  border: 1px solid #313a3d;
  border-bottom: 4px solid var(--wh-orange);
  border-radius: 0.75rem;
  color: var(--wh-paper);
  background:
    linear-gradient(112deg, rgba(25, 32, 35, 0.97), rgba(30, 50, 53, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 5rem, rgba(255, 255, 255, 0.06) 5rem 5.06rem),
    var(--wh-navy);
}

.wh-slides-hero__copy {
  padding: clamp(2.2rem, 6vw, 5rem);
}

.wh-slides-eyebrow,
.wh-slide-module__meta,
.wh-slide-card__index {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.wh-slides-eyebrow {
  color: #ffd28e;
}

.wh-slides-hero h1 {
  max-width: 10ch;
  margin: 0.8rem 0 0;
  color: var(--wh-paper);
  font-size: clamp(3rem, 7vw, 5.7rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.wh-slides-hero__lead {
  margin: 1.7rem 0 0;
  color: var(--wh-paper);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-weight: 650;
}

.wh-slides-hero__intro {
  max-width: 62ch;
  margin: 0.8rem 0 0;
  color: #dce3e2;
  line-height: 1.7;
}

.wh-slides-hero__rail {
  display: grid;
  align-content: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.035);
}

.wh-slides-hero__rail div {
  display: flex;
  min-height: 8rem;
  flex-direction: column;
  justify-content: center;
  padding: 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.wh-slides-hero__rail div:last-child {
  border-bottom: 0;
}

.wh-slides-hero__rail strong,
.wh-slides-hero__rail span {
  display: block;
}

.wh-slides-hero__rail strong {
  color: var(--wh-orange);
  font-family: "Jost", "Segoe UI", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.wh-slides-hero__rail span {
  margin-top: 0.35rem;
  color: #dce3e2;
  font-size: 0.78rem;
}

.wh-slide-jump {
  margin: 1rem 0 4rem;
}

.wh-slide-jump > p {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.wh-slide-jump a {
  padding: 0.7rem 0.55rem;
  border: 1px solid var(--wh-line);
  border-radius: 0.2rem;
  color: var(--wh-green-strong);
  background: var(--wh-paper);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.wh-slide-jump a:hover,
.wh-slide-jump a:focus-visible {
  border-color: var(--wh-green-strong);
  color: var(--wh-paper);
  background: var(--wh-green-strong);
}

.wh-slide-module {
  scroll-margin-top: 5rem;
  margin: 0 0 4.5rem;
}

.wh-slide-module__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.36fr);
  min-height: 17rem;
  overflow: hidden;
  border: 1px solid var(--wh-line);
  border-radius: 0.75rem 0.75rem 0 0;
  background: var(--wh-soft);
}

.wh-slide-module__copy {
  align-self: center;
  padding: clamp(1.5rem, 4vw, 2.8rem);
}

.wh-slide-module__meta {
  color: var(--wh-orange-strong);
}

.wh-slide-module__copy h2 {
  margin: 0.55rem 0 0;
  padding: 0;
  font-size: clamp(1.75rem, 3.8vw, 2.75rem);
}

.wh-slide-module__copy h2::after {
  display: none;
}

.wh-slide-module__copy p:not(.wh-slide-module__meta) {
  max-width: 58ch;
  margin: 0.75rem 0 0;
  color: var(--wh-muted);
  line-height: 1.65;
}

.wh-slide-module__link {
  display: inline-flex;
  margin-top: 1.2rem;
  color: var(--wh-green-strong);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}

.wh-slide-module__link::after {
  margin-left: 0.45rem;
  content: "→";
}

.wh-slide-module__media {
  position: relative;
  min-height: 17rem;
  background: var(--wh-navy);
}

.wh-slide-module__media .quarto-figure,
.wh-slide-module__media figure,
.wh-slide-module__media p {
  height: 100%;
  margin: 0;
}

.wh-slide-module__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wh-slide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--wh-line);
  border-top: 0;
  border-radius: 0 0 0.75rem 0.75rem;
  background: #f8faf9;
}

.wh-slide-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 13.5rem;
  flex-direction: column;
  padding: 1.35rem;
  border: 1px solid var(--wh-line);
  border-top: 3px solid var(--wh-green);
  border-radius: 0.45rem;
  background: var(--wh-paper);
  box-shadow: 0 1px 2px rgba(22, 32, 36, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.wh-slide-card:hover,
.wh-slide-card:focus-within {
  border-color: color-mix(in srgb, var(--wh-green-strong) 70%, var(--wh-line));
  box-shadow: 0 10px 24px rgba(22, 32, 36, 0.1);
  transform: translateY(-2px);
}

.wh-slide-card:focus-within {
  outline: 3px solid color-mix(in srgb, var(--wh-orange) 80%, white);
  outline-offset: 2px;
}

.wh-slide-card__index {
  color: var(--wh-orange-strong);
}

.wh-slide-card h3 {
  margin: 0.7rem 0 0;
  color: var(--wh-navy);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.25;
}

.wh-slide-card p:not(.wh-slide-card__index) {
  margin: 0.7rem 0 0;
  color: var(--wh-muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

.wh-slide-card__link {
  display: inline-flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--wh-green-strong);
  font-family: "Jost", "Segoe UI", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.wh-slide-card__link::before {
  position: absolute;
  inset: 0;
  content: "";
}

.wh-slide-card__link::after {
  content: "↗";
}

.wh-slide-card__link:focus-visible {
  outline: none;
}

.wh-slides-footer {
  margin: 1rem 0 3rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 3px solid var(--wh-orange);
  color: var(--wh-paper);
  background: var(--wh-navy);
}

.wh-slides-footer h3 {
  margin-top: 0;
  color: var(--wh-paper);
}

.wh-slides-footer p {
  margin-bottom: 0;
  color: #dce3e2;
}

.wh-slides-footer a {
  color: #ffd28e;
}

@media (max-width: 980px) {
  .wh-slide-jump > p {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wh-slides-hero,
  .wh-slide-module__header {
    grid-template-columns: 1fr;
  }

  .wh-slides-hero__copy {
    padding: 2rem 1.35rem;
  }

  .wh-slides-hero__rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    border-left: 0;
  }

  .wh-slides-hero__rail div {
    min-height: 6.5rem;
    padding: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
    border-bottom: 0;
  }

  .wh-slides-hero__rail div:last-child {
    border-right: 0;
  }

  .wh-slide-module__media {
    min-height: 13rem;
  }

  .wh-slide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .wh-slide-jump > p {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wh-slides-hero__rail strong {
    font-size: 2rem;
  }

  .wh-slides-hero__rail span {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wh-slide-card {
    transition: none;
  }
}
