/* Lesson shell shared by pages/content.html, pages/tutorial.html, and
   pages/content_verb.html: the tools row, the title row with its CEFR pills, and the
   language selector. Body text: pages/content.css. */

.lesson-top {
  padding-bottom: 3rem;
}

/* Tools row above the breadcrumb. It fills the header-to-content gap (main.main--tools
   drops its own top padding), so the breadcrumb starts where it does on other pages. */
.lesson-tools {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: var(--layout-content-gap);
  padding-bottom: 0.5rem;
}

.lesson-hero {
  margin-top: 0;
  padding: 0;
}

.lesson-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-top: 0;
}

.lesson-title:has(.lesson-title__end) {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.7rem;
}

.lesson-title .page-heading {
  min-width: 0;
}

.lesson-title__end {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  /* Optically center the CEFR pill against the first H1 line. */
  margin-top: 0.35rem;
}

/* Language selector: Canvas track, the current language on French blue-gray */
.lang-switch {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  background: var(--color-lang-switch-background);
}

.lang-switch a,
.lang-switch [aria-current="page"] {
  min-width: max-content;
  padding: 0.375rem 0.75rem;
  border-radius: calc(var(--radius-sm) - 0.25rem);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: center;
  white-space: nowrap;
}

.lang-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.lang-switch [aria-current="page"] {
  background: var(--color-lang-switch-active);
}
