.wp-block-spectra-container.nihao-student-results-wrapper {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
}

.wp-block-nihao-student-results.nihao-results {
	width: 100%;
	max-width: none;
	padding: 56px 24px;
	box-sizing: border-box;
	background: #fff;
	color: #070603;
}

.nihao-results__container {
	width: min(1120px, 100%);
	margin: 0 auto;
}

.nihao-results__header {
	max-width: none;
	margin: 0 0 40px;
	text-align: left;
}

.nihao-results__eyebrow {
	margin-bottom: 8px;
	color: #b37100;
	font-family: "Inter", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	text-transform: uppercase;
}

.nihao-results__title {
	margin: 0;
	color: #070603;
	font-family: "Lora", Times New Roman, serif;
	font-size: 32px;
	font-weight: 700;
	line-height: 40px;
}

.nihao-results__tabs {
	display: flex;
	justify-content: flex-start;
	gap: 8px;
	margin-bottom: 30px;
}

.nihao-results__tab {
	min-width: 181px;
	padding: 10px 40px;
	border: 1px solid #cdcdcf;
	border-radius: 999px;
	background: #fff;
	color: #3d3d40;
	font-family: "Inter", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	cursor: pointer;
	transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.nihao-results__tab:hover {
	border-color: #000;
}

.nihao-results__tab.is-active {
	border-color: #000;
	background: #000;
	color: #fff;
}

.nihao-results__tab:focus-visible {
	outline: 3px solid rgb(179 113 0 / 35%);
	outline-offset: 3px;
}

.nihao-results__panel[hidden],
.nihao-results-modal[hidden] {
	display: none !important;
}

.nihao-results__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.nihao-result-card {
	overflow: visible;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.nihao-result-card__video,
.nihao-result-card__score-image {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 0;
	border-radius: 8px;
	background: #222;
	color: #fff;
	cursor: pointer;
}

.nihao-result-card__video:disabled {
	cursor: default;
}

.nihao-result-card__thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.nihao-result-card:hover .nihao-result-card__thumbnail {
	transform: scale(1.035);
}

.nihao-result-card__video-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 68%), transparent 60%);
}

.nihao-result-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	border: 2px solid #aaa;
	border-radius: 50%;
	background: transparent;
	color: #aaa;
	font-size: 14px;
	transform: translate(-50%, -50%);
}

.nihao-result-card__video-title {
	position: absolute;
	z-index: 1;
	right: 18px;
	bottom: 22px;
	left: 24px;
	color: #fff;
	font-family: "Inter", "Times New Roman", sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 24px;
	text-align: left;
}

.nihao-result-card__score-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #ff8500;
	color: #fff;
	font-weight: 700;
}

/* Score cards contain only the featured image. */
.nihao-result-card--score .nihao-result-card__score-image {
	aspect-ratio: auto;
	height: auto;
	background: transparent;
	cursor: default;
}

.nihao-result-card--score .nihao-result-card__thumbnail {
	width: 100%;
	height: auto;
	object-fit: contain;
}

.nihao-result-card__body {
	padding: 18px 4px 0;
}

.nihao-result-card__title {
	margin: 0 0 16px;
	font-size: 19px;
	line-height: 1.4;
}

.nihao-result-card__title a {
	color: inherit;
	text-decoration: none;
}

.nihao-result-card__quote {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.nihao-result-card__quote-image {
	flex: 0 0 20px;
	display: block;
	width: 20px;
	height: 20px;
	margin: 0;
	object-fit: contain;
}

.nihao-result-card__quote-mark {
	flex: 0 0 20px;
	display: block;
	width: 20px;
	height: 20px;
	overflow: hidden;
	color: #b37100;
	font-family: Georgia, serif;
	font-size: 36px;
	font-weight: 700;
	line-height: .75;
	text-align: left;
}

.nihao-result-card__quote-content {
	flex: 1;
	min-width: 0;
	color: #4c4c4f;
	font-size: 16px;
	font-style: italic;
	line-height: 1.7;
}

.nihao-result-card__student {
	margin-top: 12px;
	margin-left: 32px;
	color: #b86f00;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

.nihao-results__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 32px;
	border-radius: 12px;
	background: #fff;
	text-align: center;
}

.nihao-results-modal {
	position: fixed !important;
	z-index: 2147483647 !important;
	inset: 0 !important;
	display: grid;
	width: 100vw;
	height: 100dvh;
	padding: 60px 24px 24px;
	box-sizing: border-box;
	place-items: center;
}

.nihao-results-modal__backdrop {
	position: fixed;
	z-index: 0;
	inset: 0;
	background: rgb(0 0 0 / 88%);
}

.nihao-results-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(960px, 100%);
}

.nihao-results-modal__close {
	position: absolute;
	z-index: 3;
	top: 12px;
	right: 12px;
	display: grid;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0 !important;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 55%);
	border-radius: 50%;
	appearance: none;
	background: rgb(0 0 0 / 65%);
	box-sizing: border-box;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.nihao-results-modal__close:hover {
	border-color: #fff;
	background: #000;
	transform: rotate(90deg);
}

.nihao-results-modal__close:focus-visible {
	outline: 3px solid rgb(255 255 255 / 45%);
	outline-offset: 3px;
}

.nihao-results-modal__content {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	background: #000;
}

.nihao-results-modal__content iframe,
.nihao-results-modal__content video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

body.nihao-results-modal-open {
	overflow: hidden;
}

@media (max-width: 900px) {
	.nihao-results__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.wp-block-nihao-student-results.nihao-results {
		padding: 48px 24px;
	}

	.nihao-results__header {
		margin-bottom: 26px;
	}

	.nihao-results__tabs {
		overflow-x: auto;
		padding: 3px 0 8px;
		scrollbar-width: none;
	}

	.nihao-results__tabs::-webkit-scrollbar {
		display: none;
	}

	.nihao-results__tab {
		min-width: max-content;
		padding: 8px 22px;
	}

	.nihao-results__grid {
		grid-template-columns: 1fr;
	}

	.nihao-result-card__body {
		padding: 16px 2px 0;
	}

	.nihao-results-modal {
		padding: 24px 16px;
	}

	.nihao-results-modal__close {
		top: 8px;
		right: 8px;
		width: 36px;
		height: 36px;
		font-size: 25px;
	}
}

/* Both tabs use Swiper at every viewport; navigation arrows are intentionally omitted. */
.wp-block-nihao-student-results .nihao-results__swiper {
	width: 100%;
	overflow: hidden;
}

.wp-block-nihao-student-results .nihao-results__grid.swiper-wrapper {
	display: flex;
	grid-template-columns: none;
	gap: 0;
	width: 100%;
	box-sizing: content-box;
}

.wp-block-nihao-student-results .nihao-result-card.swiper-slide {
	flex-shrink: 0;
	width: auto;
	height: auto;
	margin: 0;
}
