/* Optional sections of listing and download pages: What's new, help box, FAQ,
   Popular this week. Same cards and tokens as the rest, so dark mode needs no overrides. */

.lm-extra {
	margin: 0 0 28px;
	padding: 20px 24px;
	background: var( --lm-panel );
	border: 1px solid var( --lm-line );
	border-radius: 12px;
}

#download-page-static .lm-extra {
	margin: 10px 0 30px;
	padding: 20px;
	border-radius: 10px;
	box-shadow: var( --lm-shadow-sm );
}

html body .lm-extra .lm-extra-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var( --lm-ink );
}

/* What's new */
.lm-whats-new-body {
	font-size: 15px;
	line-height: 1.6;
	color: var( --lm-ink );
	overflow-wrap: anywhere;
}

.lm-whats-new-body p {
	margin: 0 0 8px;
}

.lm-whats-new-body ul {
	margin: 0 0 8px;
	padding-left: 1.35em;
	list-style: disc;
}

.lm-whats-new-body li {
	margin: 0 0 6px;
	padding-left: 0.3em;
}

.lm-whats-new-body li::marker {
	color: var( --lm-link );
}

.lm-whats-new-body > :last-child,
.lm-whats-new-body li:last-child {
	margin-bottom: 0;
}

/* Help box */
.lm-help-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lm-help-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: var( --lm-tap );
	padding: 8px 0;
	font-size: 15px;
	line-height: 1.45;
	color: var( --lm-link );
	text-decoration: none;
}

.lm-help-list a:hover span {
	text-decoration: underline;
}

.lm-help-list li + li {
	border-top: 1px solid color-mix( in srgb, var( --lm-line ) 55%, transparent );
}

.lm-help-list li:last-child a {
	padding-bottom: 0;
}

/* FAQ */
.lm-faq-item {
	border-top: 1px solid color-mix( in srgb, var( --lm-line ) 55%, transparent );
}

.lm-extra-title + .lm-faq-item {
	border-top: 0;
}

.lm-faq-item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 10px 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	color: var( --lm-ink );
	cursor: pointer;
	list-style: none;
}

.lm-faq-item summary::-webkit-details-marker {
	display: none;
}

.lm-faq-icon {
	flex: none;
	color: var( --lm-link );
}

.lm-faq-item[open] .lm-faq-icon {
	transform: rotate( 180deg );
}

@media ( prefers-reduced-motion: no-preference ) {
	.lm-faq-icon {
		transition: transform 0.15s ease;
	}
}

.lm-faq-answer {
	padding-bottom: 14px;
	font-size: 15px;
	line-height: 1.65;
	color: var( --lm-muted );
	overflow-wrap: anywhere;
}

.lm-faq-answer p {
	margin: 0 0 8px;
}

.lm-faq-answer p:last-child {
	margin-bottom: 0;
}

.lm-faq-item:last-child .lm-faq-answer {
	padding-bottom: 0;
}

.lm-help-list a:focus-visible,
.lm-faq-item summary:focus-visible {
	outline: 3px solid var( --lm-focus );
	outline-offset: 2px;
}

/* Popular this week: up to 6 cards, 3 per row on every width. */
#download-page-static .lm-popular-week {
	padding: 0;
	margin: 0 0 24px;
}

.lm-popular-week .editor-app-display.grid-home {
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
}

@media ( max-width: 860px ) {
	.lm-extra {
		margin-bottom: 22px;
		padding: 16px;
	}

	#download-page-static .lm-extra {
		padding: 16px;
		margin-bottom: 24px;
	}
}
