.timeline {
	margin: auto;
	padding: 2em 1.5em 0;
	width: 100%;
	max-width: 36em;
}

.timeline__arrow {
	background-color: transparent;
	border-radius: 0.25em;
	cursor: pointer;
	flex-shrink: 0;
	margin-inline-end: 0.25em;
	outline: transparent;
	width: 2em;
	height: 2em;
	transition:
		background-color calc(var(--trans-dur) / 2) linear,
		color var(--trans-dur);
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.timeline__arrow:focus-visible,
.timeline__arrow:hover {
	background-color: hsl(var(--hue), 10%, 50%, 0.4);
}

.timeline__arrow-icon {
	display: block;
	pointer-events: none;
	transform: rotate(-90deg);
	transition: transform var(--trans-dur) var(--trans-timing);
	width: 100%;
	height: auto;
	color: white;
}

/* Button */
.btn {
	/* background-color: var(--fg); */
	/* background-color: rgb(74, 6, 221); */
	border-radius: 0.25em;
	/* border-color: rgb(76, 51, 190); */
	border-color: white;
	border-width: 0.15em;
	color: var(--bg);
	cursor: pointer;
	padding: 0.375em 0.75em 0.5em;
	transition:
		background-color calc(var(--trans-dur) / 2) linear,
		color var(--trans-dur);
	-webkit-tap-highlight-color: transparent;
	font-size: 1.1rem;
}

.btn:hover {
	background-color: hsl(var(--hue), 10%, 50%);
	color: rgba(93, 171, 255, 0.824);
}

.btn-group {
	display: flex;
	gap: 0.375em;
	margin-bottom: 1.5em;
}

.timeline__date {
	font-size: 0.833em;
	line-height: 2.4;
}

.timeline__dot {
	background-color: currentColor;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
	margin: 0.625em 0;
	margin-inline-end: 1em;
	position: relative;
	width: 0.75em;
	height: 0.75em;
}

.timeline__item {
	position: relative;
	padding-bottom: 4.8em;
}

.timeline__item:not(:last-child):before {
	background-color: currentColor;
	content: "";
	display: block;
	position: absolute;
	top: 1em;
	left: 2.625em;
	width: 0.125em;
	height: 100%;
	transform: translateX(-50%);
}

[dir="rtl"] .timeline__arrow-icon {
	transform: rotate(90deg);
}

[dir="rtl"] .timeline__item:not(:last-child):before {
	right: 2.625em;
	left: auto;
	transform: translateX(50%);
}

.timeline__item-header {
	display: flex;
}

.timeline__item-body {
    border-radius: 0.375em;
    overflow: hidden;
    margin-top: 0.5em;
    margin-inline-start: 4em;
    height: 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease; 
    will-change: height, opacity;
}

.timeline__item-body-content {
    background-color: hsl(var(--hue),10%,50%,0.2);
    opacity: 0;
    padding: 0.5em 0.75em;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
}

.timeline__meta {
	width: 100%;
}

.timeline__title {
	font-size: 1.5em;
	line-height: 1.333;
}

/* Expanded state */
.timeline__item-body--expanded {
	height: auto;
}

.timeline__item-body--expanded .timeline__item-body-content {
	opacity: 1;
	visibility: visible;
	transition-delay: var(--trans-dur), 0s;
}

.timeline__arrow[aria-expanded="true"] .timeline__arrow-icon {
	transform: rotate(0);
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
	:root {
		--bg: hsl(var(--hue), 10%, 10%);
		--fg: hsl(var(--hue), 10%, 90%);
		--primary: hsl(var(--hue), 90%, 70%);
	}
}