/**
 * my-stg Portal – MasterStudy im stg-Stil
 *
 * Kursübersicht, Kursseite, Kurs-Player (Lektionen, Quiz) und Konto.
 * Farben und Schriften kommen aus den stg-Variablen (portal.css bzw. Elementor-Kit).
 * Die Grundfarben stellt MasterStudy selbst über Einstellungen → Allgemein → Farben ein
 * (Akzent = Petrol), hier wird nur ergänzt, was die Einstellungen nicht abdecken.
 */

/* ------------------------------------------------------------------ */
/* Schriften                                                           */
/* ------------------------------------------------------------------ */

/* Container und alle Kinder (MasterStudy setzt „Albert Sans“ direkt auf p, li, span …).
   Symbolschriften (stmlms-, Font Awesome) bleiben unberührt. */
body :is(
	.masterstudy-course-player-header,
	.masterstudy-course-player-content,
	.masterstudy-course-player-curriculum,
	.masterstudy-course-player-navigation,
	.masterstudy-course-player-discussions,
	[class*="masterstudy-single-course"],
	[class*="masterstudy-curriculum"],
	[class*="masterstudy-buy-button"],
	[class*="masterstudy-account"],
	[class*="masterstudy-enrolled"],
	[class*="masterstudy-student"],
	[class*="masterstudy-course-card"],
	[class*="stm_lms_courses__single"],
	[class*="stm-lms-wrapper"],
	[class*="stm_lms_user"],
	.masterstudy-button
) :where(*:not(i):not([class*="stmlms-"]):not([class*="fa-"]):not(.fa):not(svg):not(svg *):not(.textLayer *)),
body :where(
	.masterstudy-course-player-header,
	.masterstudy-course-player-content,
	.masterstudy-course-player-curriculum,
	.masterstudy-course-player-navigation,
	[class*="masterstudy-single-course"],
	[class*="masterstudy-account"],
	[class*="masterstudy-course-card"],
	.masterstudy-button
) {
	font-family: var(--stg-font-text, "Source Sans 3", sans-serif) !important;
}

body :is(.masterstudy-course-player-content, .masterstudy-course-player-header, .masterstudy-course-player-curriculum, [class*="masterstudy-single-course"], [class*="stm_lms_courses__single"], [class*="stm-lms-wrapper"]) :is(
	.masterstudy-course-player-content__header h1,
	.masterstudy-course-player-header__course-title,
	.masterstudy-single-course__heading,
	[class*="masterstudy-single-course"] h1,
	[class*="masterstudy-single-course"] h2,
	[class*="masterstudy-single-course"] h3,
	.masterstudy-course-player-lesson h1,
	.masterstudy-course-player-lesson h2,
	.masterstudy-course-player-lesson h3,
	.masterstudy-course-player-quiz h1,
	.masterstudy-course-player-quiz h2,
	.masterstudy-curriculum-accordion__section-title,
	.masterstudy-curriculum-list__section-title,
	.masterstudy-course-player-curriculum__title,
	.stm_lms_courses__single--title,
	.stm_lms_courses__single--title h5,
	[class*="stm_lms_"] :is(h1, h2, h3, h4)
) {
	font-family: var(--stg-font-head, "Inter", sans-serif) !important;
	color: var(--stg-petrol);
	letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

body .masterstudy-button,
body .masterstudy-buy-button,
body .masterstudy-buy-button__link {
	border-radius: var(--stg-radius-pill, 999px);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

body .masterstudy-button_style-primary,
body .masterstudy-nav-button_style-primary,
body .masterstudy-buy-button__link,
body .masterstudy-course-player-navigation__next .masterstudy-button,
body .masterstudy-course-player-lesson__submit-trigger .masterstudy-button {
	background-color: var(--stg-rot);
	border-color: var(--stg-rot);
	color: var(--stg-weiss);
}

body .masterstudy-buy-button .masterstudy-buy-button__title,
body .masterstudy-nav-button .masterstudy-nav-button__title,
body .masterstudy-button_style-primary .masterstudy-button__title,
body .masterstudy-course-player-navigation__next .masterstudy-button__title {
	color: var(--stg-weiss);
	text-transform: none;
	font-size: 17px;
	letter-spacing: 0;
}

@media (hover: hover) and (pointer: fine) {
	body .masterstudy-button_style-primary:hover,
	body .masterstudy-nav-button_style-primary:not(.masterstudy-button_disabled):hover,
	body .masterstudy-buy-button__link:hover,
	body .masterstudy-course-player-navigation__next .masterstudy-button:hover {
		background-color: var(--stg-rot-dunkel);
		border-color: var(--stg-rot-dunkel);
	}
}

body .masterstudy-button_disabled,
body .masterstudy-course-player-navigation__next .masterstudy-button_disabled {
	background-color: var(--stg-beige) !important;
	border-color: var(--stg-beige) !important;
	color: var(--stg-text) !important;
}

body .masterstudy-button_disabled .masterstudy-button__title,
body .masterstudy-button_disabled .masterstudy-nav-button__title {
	color: var(--stg-text) !important;
}

body .masterstudy-buy-button {
	background: transparent;
	border-radius: var(--stg-radius-pill, 999px);
	padding: 0;
	overflow: hidden;
}

body .masterstudy-buy-button__link {
	width: 100%;
	justify-content: center;
}

body .masterstudy-nav-button {
	border-radius: var(--stg-radius-pill, 999px);
}

body .masterstudy-button_style-secondary,
body .masterstudy-button_style-tertiary,
body .masterstudy-button_style-outline {
	background-color: var(--stg-weiss);
	border: 1px solid var(--stg-linie);
	color: var(--stg-petrol);
}

body .masterstudy-button_style-secondary .masterstudy-button__title,
body .masterstudy-button_style-tertiary .masterstudy-button__title,
body .masterstudy-button_style-outline .masterstudy-button__title {
	color: var(--stg-petrol);
}

body .masterstudy-button:focus-visible,
body .masterstudy-buy-button:focus-visible,
body .masterstudy-buy-button__link:focus-visible {
	outline: 2px solid var(--stg-petrol);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Kurs-Player: Kopfzeile                                              */
/* ------------------------------------------------------------------ */

body .masterstudy-course-player-header {
	background: var(--stg-weiss);
	border-bottom: 1px solid var(--stg-linie);
	box-shadow: none;
}

body .masterstudy-course-player-header__course-label {
	color: var(--stg-text);
	font-size: 13px;
}

body .masterstudy-course-player-header__course-title {
	font-size: 16px;
	font-weight: 600;
}

body .masterstudy-course-player-header__logo {
	width: auto;
	height: auto;
	padding: 0 12px;
}

body .masterstudy-course-player-header__logo img {
	width: 112px;
	height: auto;
	max-height: 32px;
	object-fit: contain;
}

body .masterstudy-course-player-header__curriculum,
body .masterstudy-course-player-header__discussions-toggler,
body .masterstudy-course-player-header__back {
	color: var(--stg-petrol);
	border-radius: var(--stg-radius-pill, 999px);
}

/* ------------------------------------------------------------------ */
/* Kurs-Player: Lehrplan (Seitenleiste)                                */
/* ------------------------------------------------------------------ */

body .masterstudy-course-player-curriculum,
body .masterstudy-course-player-curriculum__wrapper,
body .masterstudy-course-player-curriculum__content {
	background: var(--stg-creme);
}

body .masterstudy-course-player-curriculum {
	border-right: 1px solid var(--stg-linie);
}

body .masterstudy-course-player-curriculum__title {
	font-size: 20px;
	font-weight: 600;
	padding-top: 24px;
}

body .masterstudy-curriculum-accordion__section {
	background: var(--stg-beige);
	border-bottom: 1px solid var(--stg-linie);
}

body .masterstudy-curriculum-accordion__section-title,
body .masterstudy-curriculum-accordion__section-count {
	color: var(--stg-petrol);
}

body .masterstudy-curriculum-accordion__section-title {
	font-size: 16px;
	font-weight: 600;
}

body .masterstudy-curriculum-accordion__toggler {
	background: var(--stg-petrol);
	color: var(--stg-weiss);
}

body .masterstudy-curriculum-accordion__link {
	background: transparent;
	border-left: 3px solid transparent;
	border-bottom: 1px solid var(--stg-linie);
	transition: background-color .2s ease;
}

body .masterstudy-curriculum-accordion__title {
	color: var(--stg-petrol);
	font-size: 16px;
	font-weight: 500;
}

body .masterstudy-curriculum-accordion__meta,
body .masterstudy-curriculum-accordion__meta * {
	color: var(--stg-text);
	font-size: 14px;
}

@media (hover: hover) and (pointer: fine) {
	body .masterstudy-curriculum-accordion__link:hover {
		background: var(--stg-weiss);
	}
}

body .masterstudy-curriculum-accordion__link_current {
	background: var(--stg-weiss);
	border-left-color: var(--stg-rot);
}

body .masterstudy-curriculum-accordion__link_current .masterstudy-curriculum-accordion__title {
	font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Kurs-Player: Inhalt                                                 */
/* ------------------------------------------------------------------ */

body .masterstudy-course-player-content__header-lesson-type {
	color: var(--stg-text);
	font-size: 15px;
}

body .masterstudy-course-player-content__header h1 {
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.2;
	font-weight: 600;
}

body :is(.masterstudy-course-player-lesson, .masterstudy-course-player-quiz) :is(p, li) {
	color: var(--stg-text);
	font-size: 18px;
	line-height: 1.6;
}

body :is(.masterstudy-course-player-lesson, .masterstudy-course-player-quiz) :is(strong, b) {
	color: var(--stg-petrol);
}

/* Im Editor rot markierte Zwischenfragen in Markenrot */
body .masterstudy-course-player-lesson [style*="color: #e03e2d"],
body .masterstudy-course-player-lesson [style*="color:#e03e2d"] {
	color: var(--stg-rot) !important;
}

body .masterstudy-course-player-lesson a {
	color: var(--stg-rot);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Kurs-Player: Fußleiste                                              */
/* ------------------------------------------------------------------ */

body .masterstudy-course-player-navigation {
	background: var(--stg-weiss);
	border-top: 1px solid var(--stg-linie);
	box-shadow: none;
}

body .masterstudy-course-player-navigation__prev,
body .masterstudy-course-player-navigation__prev * {
	color: var(--stg-petrol);
}

/* ------------------------------------------------------------------ */
/* Kursseite                                                           */
/* ------------------------------------------------------------------ */

body .masterstudy-single-course__heading,
body [class*="masterstudy-single-course"] h1 {
	font-size: clamp(30px, 3.4vw, 44px);
	line-height: 1.15;
	font-weight: 600;
}

body [class*="masterstudy-single-course-categories"] a,
body [class*="masterstudy-single-course-categories"] {
	color: var(--stg-text);
}

body [class*="masterstudy-single-course"] :is(p, li) {
	color: var(--stg-text);
}

/* Kursdetails und Infokästen als creme Karten */
body .masterstudy-single-course-details {
	background: var(--stg-creme);
	border-radius: var(--stg-radius, 20px);
	padding: 24px;
}

body .masterstudy-single-course-details__title {
	font-family: var(--stg-font-head, "Inter", sans-serif) !important;
	font-size: 19px;
	font-weight: 600;
	color: var(--stg-petrol);
}

body .masterstudy-single-course-details__item {
	border-color: var(--stg-linie);
}

body [class^="masterstudy-single-course-expired"] {
	background: var(--stg-creme);
	border-radius: var(--stg-radius, 20px);
}

/* Reiter (Beschreibung, Lehrplan …) */
body [class*="masterstudy-single-course-tabs"] [class*="__item"] {
	color: var(--stg-text);
	font-weight: 600;
}

body [class*="masterstudy-single-course-tabs"] [class*="__item_active"] {
	color: var(--stg-petrol);
	border-color: var(--stg-rot);
}

/* Lehrplan auf der Kursseite */
body .masterstudy-curriculum-list__section {
	background: var(--stg-beige);
	border-radius: 12px;
}

body .masterstudy-curriculum-list__section-title {
	font-size: 17px;
	font-weight: 600;
}

body .masterstudy-curriculum-list__container,
body .masterstudy-curriculum-list__wrapper,
body .masterstudy-curriculum-list__item,
body .masterstudy-curriculum-list__link {
	background: var(--stg-weiss);
}

body .masterstudy-curriculum-list__link {
	border-bottom: 1px solid var(--stg-linie);
	border-radius: 0;
}

body .masterstudy-curriculum-list__section {
	margin-bottom: 4px;
	padding-left: 16px;
}

@media (hover: hover) and (pointer: fine) {
	body .masterstudy-curriculum-list__link:hover {
		background: var(--stg-creme);
	}
}

body .masterstudy-curriculum-list__title {
	color: var(--stg-petrol);
	font-weight: 500;
}

body .masterstudy-curriculum-list__order,
body .masterstudy-curriculum-list__meta,
body .masterstudy-curriculum-list__meta * {
	color: var(--stg-text);
}

/* Bilder mit der stg-Rundung oben rechts */
body [class*="masterstudy-single-course-thumbnail"] img,
body [class*="masterstudy-single-course"] .masterstudy-single-course__main > img {
	border-radius: var(--stg-radius, 20px) 48px var(--stg-radius, 20px) var(--stg-radius, 20px);
}

/* ------------------------------------------------------------------ */
/* Kurskarten (Kursübersicht, Karussell)                               */
/* ------------------------------------------------------------------ */

body .stm_lms_courses__single__inner {
	overflow: hidden;
	background: var(--stg-creme);
	border: 0;
	border-radius: var(--stg-radius, 20px);
	box-shadow: none;
	transition: transform .2s ease, box-shadow .2s ease;
}

@media (hover: hover) and (pointer: fine) {
	body .stm_lms_courses__single__inner:hover {
		box-shadow: 0 12px 32px rgba(27, 57, 66, .10);
	}
}

body .stm_lms_courses__single--image {
	border-top-right-radius: 48px;
	overflow: hidden;
}

body .stm_lms_courses__single--image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

body .stm_lms_courses__single--inner {
	padding: 20px 24px 24px;
	background: transparent;
}

body .stm_lms_courses__single--term,
body .stm_lms_courses__single--terms a {
	color: var(--stg-text);
	font-size: 14px;
	text-transform: none;
}

body .stm_lms_courses__single--title,
body .stm_lms_courses__single--title a,
body .stm_lms_courses__single--title h5 {
	color: var(--stg-petrol);
	font-family: var(--stg-font-head, "Inter", sans-serif) !important;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
}

body .stm_lms_courses__single--title h5 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
	margin: 6px 0 0;
}

body .stm_lms_courses__single--meta {
	border-top: 1px solid var(--stg-linie);
	margin-top: 16px;
	padding-top: 14px;
}

body .stm_lms_courses__single--price,
body .stm_lms_courses__single--price strong {
	color: var(--stg-petrol);
	font-family: var(--stg-font-text, "Source Sans 3", sans-serif) !important;
	font-size: 16px;
	font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Konto                                                               */
/* ------------------------------------------------------------------ */

body [class*="masterstudy-account"] a,
body [class*="stm-lms-user"] a {
	color: var(--stg-petrol);
}

body [class*="masterstudy-account-sidebar"] [class*="_active"],
body [class*="masterstudy-account-menu"] [class*="_active"] {
	background: var(--stg-creme);
	color: var(--stg-petrol);
	border-radius: 10px;
}

/* Fortschrittsbalken */
body [class*="masterstudy-progress"] [class*="__filled"],
body [class*="progress"] [class*="__bar-filled"] {
	background-color: var(--stg-petrol);
}

/* ------------------------------------------------------------------ */
/* Spezifischere Regeln: MasterStudy setzt Buttons mit doppelten      */
/* Klassen, daher hier html body + doppelte Klassen.                   */
/* ------------------------------------------------------------------ */

html body .masterstudy-button.masterstudy-button,
html body .masterstudy-nav-button.masterstudy-nav-button,
html body .masterstudy-buy-button.masterstudy-buy-button,
html body .masterstudy-buy-button__link.masterstudy-buy-button__link {
	border-radius: var(--stg-radius-pill, 999px);
	text-transform: none;
}

html body .masterstudy-button.masterstudy-button_style-primary:not(.masterstudy-button_disabled),
html body .masterstudy-nav-button.masterstudy-nav-button_style-primary:not(.masterstudy-button_disabled),
html body .masterstudy-buy-button__link.masterstudy-buy-button__link {
	background-color: var(--stg-rot);
	border-color: var(--stg-rot);
	color: var(--stg-weiss);
}

@media (hover: hover) and (pointer: fine) {
	html body .masterstudy-button.masterstudy-button_style-primary:not(.masterstudy-button_disabled):hover,
	html body .masterstudy-nav-button.masterstudy-nav-button_style-primary:not(.masterstudy-button_disabled):hover,
	html body .masterstudy-buy-button__link.masterstudy-buy-button__link:hover {
		background-color: var(--stg-rot-dunkel);
		border-color: var(--stg-rot-dunkel);
	}
}

html body .masterstudy-buy-button.masterstudy-buy-button {
	background: transparent;
	padding: 0;
	overflow: hidden;
}

html body .masterstudy-buy-button .masterstudy-buy-button__title {
	text-transform: none;
	letter-spacing: 0;
	font-size: 17px;
	font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Kurskarten im Konto (Eingeschriebene Kurse)                         */
/* ------------------------------------------------------------------ */

html body .masterstudy-course-card__wrapper {
	overflow: hidden;
	background: var(--stg-creme);
	border: 0;
	border-radius: var(--stg-radius, 20px);
	box-shadow: none;
}

html body .masterstudy-course-card__info {
	background: transparent;
}

html body .masterstudy-course-card,
html body .masterstudy-course-card__wrapper,
html body .masterstudy-course-card__info {
	border: 0;
	box-shadow: none;
}

html body .masterstudy-course-card [class*="__image"] {
	display: block;
	width: 100%;
	overflow: hidden;
	border-top-right-radius: 48px;
}

html body .masterstudy-course-card [class*="__image"] img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 0;
}

html body .masterstudy-course-card [class*="__title"],
html body .masterstudy-course-card [class*="__title"] a {
	font-family: var(--stg-font-head, "Inter", sans-serif) !important;
	font-weight: 600;
	color: var(--stg-petrol);
}

html body .masterstudy-course-card [class*="__category"],
html body .masterstudy-course-card [class*="__category"] a,
html body .masterstudy-course-card [class*="__date"] {
	color: var(--stg-text);
}

html body .masterstudy-course-card [class*="__lectures"],
html body .masterstudy-course-card [class*="__meta"] {
	background: var(--stg-weiss);
	border-radius: 10px;
	color: var(--stg-petrol);
}

/* Reiter im Konto (Alle, Abgeschlossen …) */
html body .masterstudy-tabs [class*="__item_active"],
html body .masterstudy-tabs [class*="_active"] {
	color: var(--stg-petrol);
	border-color: var(--stg-rot);
}

/* Kontomenü */
html body .masterstudy-account-menu a,
html body .masterstudy-account-menu [class*="__item"] {
	color: var(--stg-petrol);
	border-radius: 10px;
}

html body .masterstudy-account-menu [class*="_active"] {
	background: var(--stg-creme);
}

/* Kursseiten-Stile (z. B. „classic“): Rahmen um die Kursdetails neutral */
html body [class^="masterstudy-single-course-"][class*="__details"] {
	background: transparent;
	padding: 0;
	border-radius: 0;
}


/* ================================================================== */
/* Korrekturen nach Messung (02.12.)                                   */
/* ================================================================== */

/* Raster: Inhalt auf 1200 px wie Header und Footer */
body .container:has(> [class^="masterstudy-single-course"]) {
	max-width: 1230px;
}

html body .masterstudy-account {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

/* Restliche MasterStudy-Grautöne auf stg-Farben */
html body :is(
	.masterstudy-single-course-categories__item,
	.masterstudy-single-course-categories__title,
	.masterstudy-single-course-instructor__title,
	.masterstudy-single-course-current-students__title,
	.masterstudy-single-course-current-students__title span,
	.masterstudy-single-course-wishlist__title,
	.masterstudy-single-course-share-button__title,
	.masterstudy-course-card__start-time,
	.masterstudy-enrolled-courses-tabs__block-title,
	.masterstudy-account-settings__field-desc
) {
	color: var(--stg-text);
}

html body :is(
	.masterstudy-switch-button__title,
	.masterstudy-course-player-header__discussions-toggler__title,
	.masterstudy-nav-button_type-prev .masterstudy-nav-button__title,
	.masterstudy-tabs__item,
	.masterstudy-course-card__meta-block,
	.masterstudy-course-card__meta-block span
) {
	color: var(--stg-petrol);
}

html body .masterstudy-switch-button__burger span {
	background-color: var(--stg-petrol);
}

html body :is(.masterstudy-course-player-lesson, .masterstudy-course-player-quiz, .masterstudy-course-player-content) :is(p, li, td) {
	color: var(--stg-text);
}

/* Flächen: Diskussionen, PDF-Leiste, Zähler, Avatar */
html body :is(
	.masterstudy-course-player-discussions,
	.masterstudy-pdf-container__toolbar,
	.masterstudy-account-settings__avatar
) {
	background-color: var(--stg-creme);
}

html body .masterstudy-pdf-btn {
	background-color: var(--stg-weiss);
	border: 1px solid var(--stg-linie);
	border-radius: 8px;
}

html body .masterstudy-enrolled-courses-tabs__block-value {
	background-color: var(--stg-beige);
	color: var(--stg-petrol);
}

/* Konto-Menü: Gruppen-Überschriften ohne Großbuchstaben */
html body .masterstudy-account-menu__list-section-title {
	text-transform: none;
	letter-spacing: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--stg-text);
}

/* Sekundär-Buttons im Konto (z. B. „Neuen Kurs anlegen“) */
html body .masterstudy-button.masterstudy-button_style-secondary,
html body .masterstudy-button.masterstudy-button_style-tertiary {
	background-color: var(--stg-weiss);
	border: 1px solid var(--stg-linie);
}

html body :is(.masterstudy-button_style-secondary, .masterstudy-button_style-tertiary) .masterstudy-button__title {
	color: var(--stg-petrol);
}

/* Kurskarten im Konto: gleiche Bildhöhe, Titel wie Figma, Button unten bündig */
html body .masterstudy-course-card__wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
}

html body .masterstudy-course-card__image-link {
	display: block;
	height: auto;
	max-height: none;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-top-right-radius: 48px;
}

html body .masterstudy-course-card__image-link img,
html body img.masterstudy-course-card__image {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
	border-radius: 0;
}

html body .masterstudy-course-card__info {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 20px;
}

html body .masterstudy-course-card__info-category,
html body .masterstudy-course-card__info-category a {
	color: var(--stg-text);
	font-size: 14px;
}

html body .masterstudy-course-card__info-title,
html body .masterstudy-course-card__info-title h3 {
	font-family: var(--stg-font-head, "Inter", sans-serif) !important;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--stg-petrol);
}

html body .masterstudy-course-card__info-title h3 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
	margin: 4px 0 0;
	hyphens: auto;
}

html body .masterstudy-course-card__bottom {
	margin-top: auto;
}

/* Kursübersicht (Karussell): Titel bis 3 Zeilen statt Abschneiden mitten im Wort */
body .stm_lms_courses__single--title h5 {
	-webkit-line-clamp: 3;
	min-height: 3.9em;
	hyphens: auto;
	overflow-wrap: break-word;
}

body .stm_lms_courses_carousel__top h3 {
	font-family: var(--stg-font-head, "Inter", sans-serif) !important;
	color: var(--stg-petrol);
}

/* Lehrplan im Player: Status-Kreise sichtbar */
html body .masterstudy-curriculum-accordion__check {
	border: 1.5px solid var(--stg-linie);
	background-color: var(--stg-weiss);
	border-radius: 50%;
}


/* Restliche Grautöne (Messung 2) */
html body :is(
	.masterstudy-single-course-categories__item,
	.masterstudy-single-course-categories__item a,
	.masterstudy-single-course-tabs__item,
	.masterstudy-single-course-expired,
	.masterstudy-single-course-details__name,
	.masterstudy-discussions__not-items-subtitle
) {
	color: var(--stg-text);
}

html body .masterstudy-single-course-tabs__item.masterstudy-single-course-tabs__item_active {
	color: var(--stg-petrol);
}

html body .masterstudy-button:not(.masterstudy-button_style-primary) .masterstudy-button__title {
	color: var(--stg-petrol);
}

/* ===== Nachprüfung 2.3.2 ===== */

/* Kursleiter ohne Profilbild: leeren Avatar-Platz entfernen */
html body .masterstudy-single-course-instructor__avatar:not(:has(img)) {
	display: none;
}

/* „Teilnehmer angemeldet“ statt „Teilnehmer Angemeldet“ */
html body .masterstudy-single-course-current-students__title {
	text-transform: lowercase;
}

html body .masterstudy-single-course-current-students__title span {
	text-transform: none;
}

/* Lehrplan Kursseite: Abschnittskopf mittig, Umschalter in Petrol */
html body .masterstudy-curriculum-list .masterstudy-curriculum-list__section {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	margin-bottom: 4px;
}

html body .masterstudy-curriculum-list .masterstudy-curriculum-list__section-title {
	margin: 0;
	line-height: 1.3;
}

html body .masterstudy-curriculum-list .masterstudy-curriculum-list__toggler {
	background-color: var(--stg-petrol);
	flex: 0 0 auto;
}

html body .masterstudy-curriculum-list .masterstudy-curriculum-list__toggler::before,
html body .masterstudy-curriculum-list .masterstudy-curriculum-list__toggler::after {
	color: var(--stg-weiss);
	border-color: var(--stg-weiss);
}

/* Lehrplan: Nummern gleich breit, damit Symbole und Titel bündig stehen */
html body .masterstudy-curriculum-list .masterstudy-curriculum-list__order {
	min-width: 20px;
	text-align: right;
	color: var(--stg-text-leise);
}

/* Lehrplan: Hover einheitlich creme (Zeile und Link) */
@media (hover: hover) and (pointer: fine) {
	html body .masterstudy-curriculum-list .masterstudy-curriculum-list__item:hover,
	html body .masterstudy-curriculum-list .masterstudy-curriculum-list__item:hover :is(.masterstudy-curriculum-list__link, .masterstudy-curriculum-list__container, .masterstudy-curriculum-list__wrapper) {
		background-color: var(--stg-creme);
	}
}

html body .masterstudy-curriculum-list .masterstudy-curriculum-list__excerpt-toggler {
	color: var(--stg-petrol);
}

/* Lektionstyp-Symbole (grün/rot aus MasterStudy) in stg-Textfarbe */
html body img:is(.masterstudy-curriculum-list__image, .masterstudy-curriculum-accordion__image) {
	filter: brightness(0) saturate(100%) invert(19%) sepia(93%) saturate(257%) hue-rotate(145deg) brightness(107%) contrast(43%);
}

/* Kategorie über dem Kurstitel */
html body .masterstudy-single-course-categories .masterstudy-single-course-categories__item,
html body .masterstudy-single-course-categories .masterstudy-single-course-categories__title {
	color: var(--stg-text);
}

/* PDF-Lektion: Leiste und Blätter-Pfeile in stg-Flächen */
html body .masterstudy-course-player-pdf-lesson .masterstudy-pdf-container .masterstudy-pdf-btn,
html body .masterstudy-course-player-pdf-lesson .masterstudy-pdf-container .masterstudy-pdf-btn_disabled:hover {
	background-color: var(--stg-weiss);
	border: 1px solid var(--stg-linie);
	color: var(--stg-petrol);
}

@media (hover: hover) and (pointer: fine) {
	html body .masterstudy-course-player-pdf-lesson .masterstudy-pdf-container .masterstudy-pdf-btn:not(.masterstudy-pdf-btn_disabled):hover {
		background-color: var(--stg-beige);
	}
}

html body .masterstudy-course-player-pdf-lesson .masterstudy-pdf-container .masterstudy-pdf-btn_disabled {
	opacity: .45;
}

html body .masterstudy-course-player-pdf-lesson .masterstudy-pdf-container__footer .masterstudy-pdf-container__toolbar {
	background-color: var(--stg-beige);
	border-radius: 12px;
}

html body .masterstudy-course-player-pdf-lesson .masterstudy-pdf-container__footer .masterstudy-pdf-container__toolbar .masterstudy-toolbar__section,
html body .masterstudy-course-player-pdf-lesson .masterstudy-pdf-container__footer .masterstudy-pdf-container__toolbar .masterstudy-toolbar__section :is(span, input, button) {
	color: var(--stg-petrol);
}

/* Button-Beschriftung so wie übersetzt (MasterStudy setzt sonst „Kurs Beginnen“) */
html body .masterstudy-button .masterstudy-button__title,
html body .masterstudy-nav-button .masterstudy-nav-button__title {
	text-transform: none;
}

/* Player mobil: Lektionstitel kleiner, weniger Silbentrennung */
@media (max-width: 767px) {
	html body .masterstudy-course-player-content__header h1 {
		font-size: 22px;
		line-height: 1.25;
	}
}

/* Konto: Hinweistexte, mobile Leiste und Zurück-Knopf */
html body .masterstudy-account-settings__field-desc.masterstudy-account-settings__field-desc {
	color: var(--stg-text);
}

html body .masterstudy-account-mobile-menu .masterstudy-account-mobile-menu__item,
html body .masterstudy-account-mobile-menu .masterstudy-account-mobile-menu__item span {
	color: var(--stg-petrol);
}

html body .masterstudy-account-sidebar .masterstudy-account-sidebar__back {
	background-color: var(--stg-beige);
	color: var(--stg-petrol);
}

/* ===== Abstände und Überlauf (2.3.5) ===== */

/* Zähler-Pillen an den Reitern („Alle 5“): echter Innenabstand */
html body .masterstudy-enrolled-courses-tabs__block-value.masterstudy-enrolled-courses-tabs__block-value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1;
	box-sizing: border-box;
}

/* Reiter im Konto: auf schmalen Bildschirmen umbrechen statt rauslaufen */
html body .masterstudy-enrolled-courses-tabs__blocks {
	flex-wrap: wrap;
	row-gap: 8px;
	max-width: 100%;
}

html body .masterstudy-enrolled-courses-tabs__block {
	white-space: nowrap;
}

/* Mobile Leiste unten im Konto: Text nicht an den Rand */
html body .masterstudy-account-mobile-menu .masterstudy-account-mobile-menu__link {
	padding-left: 8px;
	padding-right: 8px;
	min-width: 0;
}

/* Player-Kopf mobil: Lehrplan-Schalter passt in seinen Kasten */
@media (max-width: 767px) {
	html body .masterstudy-course-player-header__curriculum {
		width: auto;
		min-width: 40px;
		overflow: visible;
	}
}

/* Inaktiver Reiter auf der Kursseite: MasterStudy-Stil „underline“ hat drei Klassen und schlug unsere Farbe (2.3.12) */
html body .masterstudy-single-course-tabs.masterstudy-single-course-tabs_style-underline .masterstudy-single-course-tabs__item {
	color: var(--stg-text);
}

html body .masterstudy-single-course-tabs.masterstudy-single-course-tabs_style-underline .masterstudy-single-course-tabs__item:hover,
html body .masterstudy-single-course-tabs.masterstudy-single-course-tabs_style-underline .masterstudy-single-course-tabs__item.masterstudy-single-course-tabs__item_active {
	color: var(--stg-petrol);
}
