/* =============================================================
   RS Content — collapsible intro block
   ============================================================= */

.rscontent {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 20px;
	width: 100%;
	max-width: 633px;
	box-sizing: border-box;
}

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

/* ── Viewport holds the clipped body and the fade overlay ───────── */

.rscontent__viewport {
	position: relative;
	width: 100%;
}

.rscontent__body {
	position: relative;
	width: 100%;
	max-height: 254px;
	overflow: hidden;
	color: var(--Color-4, #808080);
	font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 25.6px;
	letter-spacing: 1.6px;
	word-wrap: break-word;
	overflow-wrap: break-word;
	transition: max-height 0.45s ease;
}

/* Inherit typography so editor markup does not fight the design. */
.rscontent__body p,
.rscontent__body li,
.rscontent__body span,
.rscontent__body div {
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

.rscontent__body > *:first-child {
	margin-top: 0;
}

.rscontent__body > *:last-child {
	margin-bottom: 0;
}

.rscontent__body img {
	max-width: 100%;
	height: auto;
}

/* ── Bottom fade ────────────────────────────────────────────────── */

.rscontent__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 58px;
	background: linear-gradient(180deg, rgba(240, 240, 240, 0) 0%, #F0F0F0 100%);
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.rscontent.is-expanded .rscontent__fade {
	opacity: 0;
}

/* ── Toggle button — hardened against theme button styles ───────── */

.rscontent__toggle,
.rscontent__toggle:hover,
.rscontent__toggle:focus,
.rscontent__toggle:active,
.rscontent__toggle:focus-visible {
	display: inline-flex;
	justify-content: flex-start;
	align-items: center;
	gap: 13px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	text-decoration: none !important;
	text-transform: none;
	color: var(--Color-3, #FF4B19) !important;
	font-family: "GillSans", "Noto Sans TC", sans-serif;
	font-size: 23px;
	font-weight: 500;
	line-height: 36.8px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: opacity 0.2s ease;
}

@media (hover: hover) {
	.rscontent__toggle:hover {
		opacity: 0.75;
	}
}

.rscontent__toggle:focus-visible {
	outline: 2px solid var(--Color-3, #FF4B19);
	outline-offset: 4px;
}

.rscontent__toggle-label {
	display: block;
	white-space: nowrap;
}

.rscontent__toggle-icon {
	display: block;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	transition: transform 0.3s ease;
}

.rscontent.is-expanded .rscontent__toggle-icon {
	transform: rotate(180deg);
}

/* ── Content shorter than the collapsed height ──────────────────── */

.rscontent--short .rscontent__body {
	max-height: none;
}

.rscontent--short .rscontent__fade,
.rscontent--short .rscontent__toggle {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.rscontent__body,
	.rscontent__fade,
	.rscontent__toggle-icon {
		transition: none;
	}
}
