.training-page {
  margin: 0;
  font: 16px/1.7 var(--ui-font);
}

.training-page *,
.training-page *::before,
.training-page *::after {
  box-sizing: border-box;
}

.tr-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px clamp(18px, 4vw, 54px) 72px;
  color: var(--ui-ink);
  overflow-wrap: anywhere;
}

.tr-main h1,
.tr-main h2,
.tr-main h3,
.tr-main h4,
.tr-main p {
  margin: 0;
}

.tr-main a,
.tr-main summary {
  color: var(--ui-blue);
}

.tr-main a {
  text-underline-offset: .2em;
}

.tr-back {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
}

.tr-back:hover,
.tr-agenda a:hover {
  text-decoration: underline;
}

.tr-intro {
  max-width: 55rem;
  margin-bottom: 28px;
}

.tr-intro h1 {
  margin: 15px 0 12px;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.25;
  letter-spacing: -.025em;
}

.tr-intro p,
.tr-audience {
  color: var(--ui-muted);
}

.tr-course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tr-handout {
  margin-top: 22px;
  padding-block: 16px;
  border-top: 1px solid var(--ui-line);
}

.tr-handout p {
  color: var(--ui-muted);
  font-size: .9375rem;
}

.tr-course-card,
.tr-agenda,
.tr-lesson {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.tr-course-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: clamp(20px, 2.8vw, 36px);
}

.tr-duration {
  display: inline-block;
  padding: 2px 10px;
  color: var(--ui-blue);
  background: var(--ui-selected);
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}

.tr-course-card h2 {
  margin: 16px 0 6px;
  font-size: 1.5rem;
  line-height: 1.4;
}

.tr-goal {
  width: 100%;
  margin: 22px 0;
  padding-top: 16px;
  border-top: 1px solid var(--ui-line);
}

.tr-goal h3,
.tr-stage h4 {
  font-size: .9375rem;
}

.tr-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 8px 16px;
  background: var(--ui-primary);
  border-radius: var(--ui-control-radius);
  font-weight: 600;
  text-decoration: none;
}

.tr-main .tr-button {
  color: #fff;
}

.tr-button:hover {
  background: var(--ui-primary-hover);
}

.tr-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 8px !important;
}

.tr-course-meta strong {
  color: var(--ui-ink);
}

.tr-layout {
  display: grid;
  grid-template-columns: minmax(205px, 25%) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tr-agenda {
  position: sticky;
  top: calc(var(--learning-header-height, 112px) + 12px);
  max-height: calc(100dvh - var(--learning-header-height, 112px) - 24px);
  overflow: auto;
  padding: 20px;
}

.tr-agenda h2 {
  margin-bottom: 8px;
  font-size: 1.125rem;
}

.tr-agenda ol {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border-block: 1px solid var(--ui-line);
}

.tr-agenda a {
  display: block;
  padding: 6px 0;
  color: var(--ui-ink);
  text-decoration: none;
}

.tr-time {
  display: block;
  color: var(--ui-muted);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}

.tr-lesson {
  min-width: 0;
  padding: clamp(18px, 3vw, 38px);
}

.tr-lesson :is(section[id], h2[id]),
#training-main {
  scroll-margin-top: calc(var(--learning-header-height, 112px) + 16px);
}

.tr-lesson h2 {
  font-size: 1.4rem;
  line-height: 1.4;
}

.tr-lesson ul {
  margin: 12px 0 0;
  padding-left: 1.45em;
}

.tr-lesson li + li {
  margin-top: 6px;
}

.tr-lesson .tr-session-heading,
#deliverables {
  margin-top: 30px;
}

.tr-stage {
  padding: 22px 0;
  border-bottom: 1px solid var(--ui-line);
}

.tr-stage-head,
.tr-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tr-stage h3 {
  font-size: 1.125rem;
  line-height: 1.5;
}

.tr-stage p {
  margin: 10px 0;
}

.tr-material,
.tr-prompt {
  margin: 14px 0;
  padding: 14px 16px;
  background: var(--ui-subtle);
}

.tr-prompt {
  border-left: 3px solid var(--ui-blue);
}

.tr-stage pre {
  margin: 6px 0 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tr-prompt button {
  padding: 3px 10px;
  border: 1px solid var(--ui-control-line);
  border-radius: 5px;
  background: var(--ui-surface);
  color: var(--ui-blue);
  font: inherit;
  cursor: pointer;
}

.tr-main summary {
  width: fit-content;
  padding-block: 4px;
  font-weight: 600;
  cursor: pointer;
}

.tr-sources {
  margin: 24px 0;
  padding-block: 12px;
  border-block: 1px solid var(--ui-line);
}

.tr-skip:not(:focus),
.tr-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.tr-skip:focus {
  position: fixed;
  z-index: 100;
  padding: 10px;
  background: var(--ui-surface);
}

@media (max-width: 800px) {
  .tr-layout,
  .tr-course-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tr-agenda {
    position: static;
    max-height: none;
  }

  .tr-agenda li a {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    align-items: baseline;
    gap: 6px;
  }
}

.tl-training-entry {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid #bed5e9;
  border-radius: 6px;
  background: #f3f8fc;
  color: #174a72;
  text-decoration: none;
}
.tl-training-entry span { font-size: 0.94rem; }
.tl-training-entry span:last-child { margin-inline-start: auto; }
.tl-training-entry:hover strong, .tl-training-entry:focus-visible strong { text-decoration: underline; }
