[v-cloak] {
	display: none !important;
}

.rm-page {
	min-height: 100vh;
	background:
		radial-gradient(circle at 84% 0%, rgba(224, 231, 255, 0.68), transparent 30rem),
		#f8fafc;
}

.rm-shell {
	max-width: 72rem;
	margin: 0 auto;
}

.rm-hero {
	border-radius: 1rem;
	background: #20195b;
	box-shadow: 0 18px 40px rgba(30, 27, 75, 0.16);
}

.rm-hero__wash {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(24, 20, 72, 0.98) 0%, rgba(36, 29, 97, 0.88) 43%, rgba(31, 27, 78, 0.34) 100%);
}

.rm-hero__tag,
.rm-hero__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	width: fit-content;
	border: 1px solid rgba(224, 231, 255, 0.32);
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.26);
	color: #eef2ff;
	font-size: 0.75rem;
	font-weight: 700;
}

.rm-hero__tag {
	padding: 0.35rem 0.65rem;
}

.rm-hero__chip {
	padding: 0.35rem 0.6rem;
}

.rm-hero-title {
	letter-spacing: -0.025em;
}

.rm-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	padding: 0.8rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.875rem;
	background: rgba(255, 255, 255, 0.88);
	color: #6b7280;
	font-size: 0.75rem;
}

.rm-subjects {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin-bottom: 0.85rem;
}

.rm-subject-tab {
	min-height: 6.6rem;
	padding: 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.875rem;
	background: #fff;
	text-align: left;
	transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.rm-subject-tab:hover {
	border-color: #c7d2fe;
	transform: translateY(-1px);
}

.rm-subject-tab:focus-visible,
.rm-section__header button:focus-visible {
	outline: 3px solid rgba(99, 102, 241, 0.3);
	outline-offset: 2px;
}

.rm-subject-tab--grammar {
	border-color: #818cf8;
	background: #eef2ff;
}

.rm-subject-tab--translation {
	border-color: #fbbf24;
	background: #fffbeb;
}

.rm-focus-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
	padding: 0.65rem 0.8rem;
	border-radius: 0.75rem;
	background: #f1f5f9;
}

.rm-section {
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 0.875rem;
	background: #fff;
}

.rm-section__header {
	transition: background-color 160ms ease;
}

.rm-section__header:hover {
	background: #fafafa;
}

.rm-content {
	border: 1px solid #c7d2fe;
	border-radius: 0.75rem;
	background: #f8faff;
}

.rm-content h1,
.rm-content h2,
.rm-content h3,
.rm-content h4 {
	margin: 1rem 0 0.5rem;
	font-weight: 700;
	color: #312e81;
}

.rm-content h1:first-child,
.rm-content h2:first-child,
.rm-content h3:first-child,
.rm-content h4:first-child,
.rm-content p:first-child {
	margin-top: 0;
}

.rm-content p {
	margin: 0.5rem 0;
}

.rm-content ul,
.rm-content ol {
	margin: 0.55rem 0;
	padding-left: 1.35rem;
}

.rm-content ul { list-style: disc; }
.rm-content ol { list-style: decimal; }

.rm-content blockquote {
	margin: 0.75rem 0;
	padding: 0.7rem 0.85rem;
	border: 1px solid #bfdbfe;
	border-radius: 0.625rem;
	background: #eff6ff;
	color: #334155;
}

.rm-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	margin: 0.75rem 0;
	border: 1px solid #dbeafe;
	border-radius: 0.625rem;
	border-spacing: 0;
	font-size: 0.875em;
}

.rm-content th,
.rm-content td {
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
	vertical-align: top;
}

.rm-content th {
	background: #eef2ff;
	font-weight: 700;
	color: #3730a3;
}

.rm-content tr:last-child td { border-bottom: 0; }

.rm-content code {
	padding: 0.1rem 0.3rem;
	border-radius: 0.25rem;
	background: #e0e7ff;
	color: #3730a3;
}

.rm-collapse-enter-active,
.rm-collapse-leave-active {
	transition: opacity 180ms ease, max-height 220ms ease;
	overflow: hidden;
}

.rm-collapse-enter,
.rm-collapse-leave-to {
	max-height: 0;
	opacity: 0;
}

.rm-collapse-enter-to,
.rm-collapse-leave {
	max-height: 5000px;
	opacity: 1;
}

@media (max-width: 640px) {
	.rm-hero__wash {
		background: linear-gradient(90deg, rgba(24, 20, 72, 0.96) 0%, rgba(36, 29, 97, 0.82) 62%, rgba(31, 27, 78, 0.4) 100%);
	}

	.rm-toolbar,
	.rm-focus-bar {
		align-items: flex-start;
		flex-direction: column;
	}

	.rm-toolbar > div:last-child {
		width: 100%;
		justify-content: space-between;
	}

	.rm-subjects {
		gap: 0.55rem;
	}

	.rm-subject-tab {
		min-height: 7.25rem;
		padding: 0.8rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rm-subject-tab,
	.rm-section__header,
	.rm-collapse-enter-active,
	.rm-collapse-leave-active {
		transition: none;
	}
}
