:root {
  --tts-ink: #17353b;
  --tts-paper: #fffdf6;
  --tts-cream: #f4eddd;
  --tts-teal: #0f7773;
  --tts-gold: #e7a326;
  --tts-coral: #d96e4c;
  --tts-line: #d4c8b2;
}

body {
  background:
    radial-gradient(circle at 15% 8%, rgba(231, 163, 38, .09), transparent 28rem),
    linear-gradient(180deg, #ede8dd 0%, #e5e2da 100%);
}

body > header,
body > nav,
body > main {
  max-width: 1240px;
}

main {
  padding-bottom: 100px;
}

.tts-lesson {
  display: grid;
  grid-template-columns: minmax(320px, .88fr) minmax(420px, 1.12fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin: 18px 0 76px;
  padding: clamp(20px, 3vw, 38px);
  border: 2px solid var(--tts-ink);
  border-radius: 28px;
  background: var(--tts-paper);
  box-shadow: 10px 12px 0 rgba(23, 53, 59, .13);
}

.tts-lesson > figure {
  position: sticky;
  top: 86px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--tts-line);
  border-radius: 20px;
  background: var(--tts-cream);
}

.tts-lesson > figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tts-lesson > figure figcaption {
  padding: 12px 16px;
  color: #5e7174;
  font-size: 14px;
  line-height: 1.55;
}

.tts-copy {
  min-width: 0;
}

.tts-copy h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--tts-teal);
  font-size: 20px;
}

.tts-copy h3:first-child::before {
  content: "声";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tts-teal);
  color: white;
  font-size: 15px;
  font-weight: 900;
}

.tts-copy p {
  margin: 0 0 15px;
  color: #263c41;
  font-size: 18px;
  line-height: 1.92;
}

.tts-copy h3:nth-of-type(2) {
  display: block;
  margin-top: 26px;
  margin-bottom: 10px;
  padding-top: 20px;
  border-top: 1px dashed var(--tts-line);
  color: var(--tts-coral);
}

.tts-copy h3:nth-of-type(2) + p {
  padding: 16px 18px;
  border-left: 7px solid var(--tts-gold);
  border-radius: 0 14px 14px 0;
  background: var(--tts-cream);
  color: var(--tts-ink);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 850;
  line-height: 1.55;
}

.tts-copy h3:nth-of-type(3) {
  display: block;
  margin-top: 22px;
  margin-bottom: 8px;
  color: #65777a;
  font-size: 16px;
}

.tts-copy h3:nth-of-type(3) + p {
  padding: 12px 14px;
  border: 1px solid var(--tts-line);
  border-radius: 12px;
  background: #fff9eb;
  color: #586a6d;
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 860px) {
  .tts-lesson {
    grid-template-columns: 1fr;
    margin-bottom: 52px;
  }

  .tts-lesson > figure {
    position: static;
  }

  .tts-copy p {
    font-size: 17px;
    line-height: 1.86;
  }
}

@media print {
  body {
    background: white;
  }

  .course-back-to-index,
  nav#TOC {
    display: none !important;
  }

  .tts-lesson {
    break-inside: avoid;
    box-shadow: none;
  }

  .tts-lesson > figure {
    position: static;
  }
}
