/* ==========================================================================
   Oman School – library front-end
   Uses the existing Oman School identity (Tajawal, blue accents, white
   cards) and exposes every visual dimension through CSS custom properties so
   the five independent panels can override them without new stylesheets.
   ========================================================================== */

.ef-oman-page {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding-block: 26px 44px;
}

.ef-oman-page > *,
.ef-oman-library,
.ef-oman-library > *,
.ef-oman-results,
.ef-oman-grid,
.ef-oman-hub,
.ef-grades-hub,
.ef-grade-page,
.ef-grade-files,
.ef-term-sections,
.ef-term-section {
	max-width: 100%;
	min-width: 0;
}

.ef-oman-page .ef-breadcrumbs {
	margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Library hero
   -------------------------------------------------------------------------- */
.ef-oman-library {
	margin: 0 0 34px;
}

.ef-oman-hero {
	position: relative;
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 18px;
	padding: clamp(18px, 3vw, 28px);
	overflow: hidden;
	border: 1px solid var(--ef-oman-border, #e2e8f0);
	border-top: 4px solid var(--ef-oman-accent, var(--ef-primary));
	border-radius: calc(var(--ef-oman-card-radius, 18px) + 4px);
	background:
		radial-gradient(ellipse at 100% 0%, rgba(37, 99, 235, .10), transparent 46%),
		linear-gradient(180deg, #ffffff 0%, var(--ef-oman-section-bg, #f8fafc) 100%);
	box-shadow: 0 22px 48px -36px rgba(15, 23, 42, .5);
}

.ef-oman-hero__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 58px;
	height: 58px;
	border: 1px solid var(--ef-oman-border, #dbeafe);
	border-radius: 16px;
	background: #ffffff;
	font-size: 28px;
	line-height: 1;
	box-shadow: 0 12px 24px -20px rgba(15, 23, 42, .55);
	font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.ef-oman-hero__text {
	flex: 1 1 auto;
	min-width: 0;
}

.ef-oman-hero__eyebrow {
	margin: 0 0 2px;
	color: var(--ef-oman-accent, var(--ef-primary));
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .2px;
}

.ef-oman-hero__title {
	margin: 0 0 6px;
	color: #0f172a;
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 900;
	line-height: 1.32;
}

.ef-oman-hero__desc {
	max-width: 78ch;
	margin: 0;
	color: #334155;
	font-size: 14px;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.ef-oman-hero__count {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: none;
	min-width: 96px;
	padding: 12px 16px;
	border: 1px solid var(--ef-oman-border, #dbeafe);
	border-radius: 14px;
	background: #ffffff;
	color: var(--ef-oman-accent, var(--ef-primary));
	text-align: center;
}

.ef-oman-hero__count strong {
	font-size: 24px;
	font-weight: 900;
	line-height: 1;
}

.ef-oman-hero__count span {
	margin-top: 4px;
	color: #475569;
	font-size: 11px;
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */
.ef-oman-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0 0 20px;
	padding: 16px;
	border: 1px solid var(--ef-oman-border, #e2e8f0);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 18px 40px -38px rgba(15, 23, 42, .55);
}

.ef-oman-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1 1 140px;
	max-width: 100%;
	min-width: 0;
	margin: 0;
}

.ef-oman-field--search {
	flex: 2 1 230px;
}

.ef-oman-field > span {
	color: #475569;
	font-size: 11px;
	font-weight: 800;
}

.ef-oman-field input,
.ef-oman-field select {
	width: 100%;
	min-height: 38px;
	padding: 7px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	background: #ffffff;
	color: #0f172a;
	font-family: inherit;
	font-size: 12.5px;
	line-height: 1.4;
}

.ef-oman-field input:focus,
.ef-oman-field select:focus {
	border-color: var(--ef-oman-accent, var(--ef-primary));
	outline: 2px solid rgba(37, 99, 235, .18);
	outline-offset: 1px;
}

.ef-oman-filters__actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 8px;
}

.ef-oman-filters__actions .ef-btn {
	min-height: 38px;
	white-space: nowrap;
}

.ef-oman-reset {
	padding: 8px 10px;
	border: 0;
	background: transparent;
	color: #475569;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ef-oman-reset:hover {
	color: var(--ef-oman-accent, var(--ef-primary));
}

/* --------------------------------------------------------------------------
   Results + grid
   -------------------------------------------------------------------------- */
.ef-oman-results {
	min-width: 0;
}

.ef-oman-results.is-loading {
	opacity: .55;
	pointer-events: none;
	transition: opacity .18s ease;
}

.ef-oman-results__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 0 0 12px;
}

.ef-oman-results__head p {
	margin: 0;
	color: #334155;
	font-size: 13px;
}

.ef-oman-results__head strong {
	color: #0f172a;
	font-weight: 900;
}

.ef-oman-results__hint {
	color: #64748b !important;
	font-size: 11.5px !important;
}

.ef-oman-grid {
	display: grid;
	grid-template-columns: repeat(var(--ef-oman-columns, 3), minmax(0, 1fr));
	gap: var(--ef-oman-gap, 18px);
	align-items: stretch;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.ef-oman-card {
	display: grid;
	grid-template-columns: calc(var(--ef-oman-image-w, 96px) + 12px) minmax(0, 1fr);
	align-items: stretch;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--ef-oman-border, #e2e8f0);
	border-radius: var(--ef-oman-card-radius, 18px);
	background: var(--ef-oman-card-bg, #ffffff);
	box-shadow: 0 20px 44px -38px rgba(15, 23, 42, .55);
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ef-oman-card:hover {
	border-color: #bfdbfe;
	box-shadow: 0 26px 50px -34px rgba(37, 99, 235, .42);
	transform: translateY(-1px);
}

.ef-oman-card--no-media {
	grid-template-columns: minmax(0, 1fr);
}

.ef-oman-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	width: var(--ef-oman-image-w, 96px);
	height: var(--ef-oman-image-h, 128px);
	margin: 12px auto;
	overflow: hidden;
	border: 1px solid var(--ef-oman-border, #e2e8f0);
	border-radius: var(--ef-oman-image-radius, 12px);
	background: #f8fafc;
}

.ef-oman-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	padding: 4px;
	object-fit: contain;
	object-position: center;
}

.ef-oman-card__fallback {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: 100%;
	padding: 8px;
	background:
		radial-gradient(circle at 18% 14%, rgba(255, 255, 255, .24), transparent 40%),
		linear-gradient(135deg, var(--ef-indigo, #1e3a8a), var(--ef-oman-accent, var(--ef-primary)));
	color: #ffffff;
	text-align: center;
}

.ef-oman-card__emoji {
	font-size: 26px;
	line-height: 1;
	font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.ef-oman-card__fallback span:last-child {
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1.4;
	opacity: .95;
}

.ef-oman-card__body {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
	padding: var(--ef-oman-card-padding, 15px);
}

.ef-oman-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	min-height: 20px;
	min-width: 0;
}

.ef-oman-badge {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-width: 0;
	padding: 3px 8px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--ef-oman-badge-bg, #eff6ff);
	color: var(--ef-oman-badge-color, #1e3a8a);
	font-size: var(--ef-oman-badge-size, 10.5px);
	font-weight: 800;
	line-height: 1.5;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ef-oman-grade {
	flex: none;
	color: #475569;
	font-size: var(--ef-oman-badge-size, 10.5px);
	font-weight: 700;
}

.ef-oman-card__title {
	margin: 0;
	color: #0f172a;
	font-size: var(--ef-oman-title-size, 16px);
	font-weight: 800;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.ef-oman-card__title a {
	color: inherit;
	text-decoration: none;
}

.ef-oman-card__title a:hover {
	color: var(--ef-oman-accent, var(--ef-primary));
}

.ef-oman-card__meta {
	display: flex;
	align-items: center;
	gap: 5px 9px;
	flex-wrap: wrap;
	min-width: 0;
	overflow-wrap: anywhere;
	color: #475569;
	font-size: var(--ef-oman-meta-size, 11px);
	font-weight: 600;
	line-height: 1.6;
}

.ef-oman-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ef-oman-card__meta span + span::before {
	content: '·';
	margin-inline-end: 3px;
	color: #cbd5e1;
}

.ef-oman-card__excerpt {
	margin: 0;
	color: #334155;
	font-size: var(--ef-oman-meta-size, 11px);
	line-height: 1.75;
	overflow-wrap: anywhere;
}

.ef-oman-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
	min-width: 0;
}

.ef-oman-card__files {
	display: inline-flex;
	gap: 4px;
	flex-wrap: wrap;
	min-width: 0;
}

.ef-oman-card__files em {
	padding: 2px 5px;
	border: 1px solid var(--ef-oman-border, #e2e8f0);
	border-radius: 5px;
	background: #f8fafc;
	color: #475569;
	font-size: 8.5px;
	font-style: normal;
	font-weight: 800;
	letter-spacing: .3px;
}

.ef-oman-card__action {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex: none;
	padding: 7px 11px;
	border: 1px solid var(--ef-oman-accent, var(--ef-primary));
	border-radius: 9px;
	background: var(--ef-oman-accent, var(--ef-primary));
	color: #ffffff;
	font-size: 11.5px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 12px 24px -18px rgba(37, 99, 235, .9);
	transition: filter .18s ease, transform .18s ease;
}

.ef-oman-card__action:hover {
	color: #ffffff;
	filter: brightness(.94);
	transform: translateY(-1px);
}

.ef-oman-card__action .ef-icon {
	width: 13px;
	height: 13px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.ef-oman-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin: 26px 0 4px;
}

.ef-oman-pagebtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--ef-oman-border, #e2e8f0);
	border-radius: 9px;
	background: #ffffff;
	color: #0f172a;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
}

.ef-oman-pagebtn:hover {
	border-color: #bfdbfe;
	background: #eff6ff;
	color: var(--ef-oman-accent, var(--ef-primary));
}

.ef-oman-pagebtn.is-current {
	border-color: var(--ef-oman-accent, var(--ef-primary));
	background: var(--ef-oman-accent, var(--ef-primary));
	color: #ffffff;
}

.ef-oman-pagebtn.is-dots {
	border-color: transparent;
	background: transparent;
}

.ef-oman-pagebtn.is-disabled {
	opacity: .4;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.ef-oman-empty {
	padding: 38px 20px;
	border: 1px dashed #cbd5e1;
	border-radius: 18px;
	background: #ffffff;
	color: #334155;
	text-align: center;
}

.ef-oman-empty__icon {
	display: block;
	margin-bottom: 8px;
	font-size: 38px;
	line-height: 1;
}

.ef-oman-empty h3 {
	margin: 0 0 6px;
	color: #0f172a;
	font-size: 18px;
	font-weight: 800;
}

.ef-oman-empty p {
	max-width: 62ch;
	margin: 0 auto;
	font-size: 13.5px;
	line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Hub
   -------------------------------------------------------------------------- */
.ef-oman-page__head {
	margin: 0 0 22px;
	padding: clamp(18px, 3vw, 28px);
	border: 1px solid var(--ef-border, #e2e8f0);
	border-top: 4px solid var(--ef-primary);
	border-radius: 20px;
	background:
		radial-gradient(ellipse at 100% 0%, rgba(37, 99, 235, .09), transparent 42%),
		linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	box-shadow: 0 22px 48px -34px rgba(15, 23, 42, .5);
}

.ef-oman-page__head h1 {
	margin: 0 0 8px;
	color: #0f172a;
	font-size: clamp(1.6rem, 3.6vw, 2.3rem);
	font-weight: 900;
	line-height: 1.3;
}

.ef-oman-page__lead {
	max-width: 78ch;
	margin: 0;
	color: #334155;
	font-size: 14.5px;
	line-height: 1.85;
	overflow-wrap: anywhere;
}

.ef-oman-page__content {
	margin-bottom: 22px;
}

.ef-oman-hub {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 20px;
}

.ef-oman-hub-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	border: 1px solid var(--ef-oman-border, #e2e8f0);
	border-inline-start: 4px solid var(--ef-oman-accent, var(--ef-primary));
	border-radius: 16px;
	background: #ffffff;
	color: #0f172a;
	text-decoration: none;
	box-shadow: 0 18px 40px -38px rgba(15, 23, 42, .55);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ef-oman-hub-card:hover {
	border-color: #bfdbfe;
	box-shadow: 0 24px 48px -34px rgba(37, 99, 235, .4);
	transform: translateY(-2px);
}

.ef-oman-hub-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 13px;
	background: #f1f5f9;
	font-size: 24px;
	line-height: 1;
	font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.ef-oman-hub-card__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1 1 auto;
	min-width: 0;
}

.ef-oman-hub-card__body strong {
	color: #0f172a;
	font-size: 15px;
	font-weight: 800;
}

.ef-oman-hub-card__body small {
	color: #475569;
	font-size: 11.5px;
	line-height: 1.65;
}

.ef-oman-hub-card__count {
	flex: none;
	padding: 5px 9px;
	border-radius: 999px;
	background: #eff6ff;
	color: var(--ef-oman-accent, var(--ef-primary));
	font-size: 10.5px;
	font-weight: 800;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
	.ef-oman-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ef-oman-filters__actions {
		flex-basis: 100%;
		justify-content: flex-start;
	}
}

@media (max-width: 760px) {
	.ef-oman-hero {
		flex-wrap: wrap;
		gap: 12px;
	}

	.ef-oman-hero__icon {
		width: 48px;
		height: 48px;
		font-size: 23px;
	}

	.ef-oman-hero__count {
		flex-direction: row;
		gap: 6px;
		min-width: 0;
		padding: 8px 12px;
	}

	.ef-oman-hero__count strong {
		font-size: 18px;
	}

	.ef-oman-hero__count span {
		margin: 0;
	}

	.ef-oman-filters {
		flex-direction: column;
		align-items: stretch;
		padding: 13px;
	}

	.ef-oman-field,
	.ef-oman-field--search {
		flex: 0 0 auto;
		width: 100%;
	}

	.ef-oman-filters__actions {
		flex-basis: auto;
		width: 100%;
		justify-content: space-between;
	}

	.ef-oman-grid,
	.ef-oman-hub {
		grid-template-columns: 1fr;
	}

	.ef-oman-card {
		grid-template-columns: calc(min(var(--ef-oman-image-w, 96px), 84px) + 12px) minmax(0, 1fr);
	}

	.ef-oman-card--no-media {
		grid-template-columns: 1fr;
	}

	.ef-oman-card__media {
		width: min(var(--ef-oman-image-w, 96px), 84px);
		height: min(var(--ef-oman-image-h, 128px), 112px);
		margin: 10px auto;
	}

	.ef-oman-card__body {
		padding: 12px;
	}

	.ef-oman-page {
		padding-block: 18px 34px;
	}
}

@media (max-width: 400px) {
	.ef-oman-card {
		grid-template-columns: 78px minmax(0, 1fr);
	}

	.ef-oman-card__media {
		width: 72px;
		height: 96px;
	}

	.ef-oman-card__action span {
		display: none;
	}

	.ef-oman-card__action {
		padding: 8px;
	}
}

/* ==========================================================================
   Grade-first home page
   ========================================================================== */
.ef-hero--grades {
	padding-block: 42px 66px;
}

.ef-hero--grades .ef-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
	align-items: center;
	gap: clamp(24px, 4vw, 54px);
	max-width: var(--ef-container, 1200px);
	text-align: start;
}

.ef-hero--grades .ef-hero__title,
.ef-hero--grades .ef-hero__text {
	margin-inline: 0;
	max-width: 640px;
}

.ef-hero__copy .ef-eyebrow {
	margin-bottom: 14px;
}

.ef-home-search {
	display: flex;
	align-items: stretch;
	gap: 8px;
	max-width: 560px;
	margin: 0 0 18px;
	padding: 6px;
	border: 1px solid #dbeafe;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 20px 42px -34px rgba(15, 23, 42, .5);
}

.ef-home-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 14px;
	border: 0;
	background: transparent;
	color: var(--ef-navy);
	font: inherit;
	font-size: 14px;
	outline: none;
}

.ef-home-search .ef-btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ef-hero__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ef-quick-link {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border: 1px solid #dbeafe;
	border-radius: 999px;
	background: #ffffff;
	color: #1e3a8a;
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
	transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.ef-quick-link:hover {
	border-color: var(--ef-primary);
	background: #eff6ff;
	color: var(--ef-primary);
}

.ef-hero__panel {
	padding: 22px;
	border: 1px solid #dbeafe;
	border-radius: 22px;
	background:
		radial-gradient(ellipse at 10% 0%, rgba(37, 99, 235, .10), transparent 52%),
		#ffffff;
	box-shadow: 0 30px 60px -48px rgba(15, 23, 42, .6);
}

.ef-hero--grades .ef-hero__stats {
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 18px;
	margin-bottom: 16px;
	border-bottom: 1px solid #e2e8f0;
}

.ef-hero--grades .ef-stat {
	text-align: center;
	flex: 1 1 0;
}

.ef-hero__stages {
	display: grid;
	gap: 8px;
}

.ef-hero-stage {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	column-gap: 10px;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 13px;
	background: #f8fafc;
	color: var(--ef-navy);
	text-decoration: none;
	transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.ef-hero-stage > span {
	grid-row: span 2;
	font-size: 22px;
	line-height: 1;
}

.ef-hero-stage strong {
	font-size: 13.5px;
}

.ef-hero-stage small {
	color: #64748b;
	font-size: 11.5px;
}

.ef-hero-stage:hover {
	border-color: #bfdbfe;
	background: #eff6ff;
	transform: translateY(-1px);
}

/* Grades hub --------------------------------------------------------------- */
.ef-grades-hub {
	display: grid;
	gap: 26px;
}

.ef-stage {
	padding: clamp(16px, 2.4vw, 24px);
	border: 1px solid #e2e8f0;
	border-radius: 22px;
	background: #ffffff;
	box-shadow: 0 24px 56px -50px rgba(15, 23, 42, .55);
}

.ef-stage__head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 18px;
}

.ef-stage__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 15px;
	background: #eff6ff;
	font-size: 26px;
	line-height: 1;
	font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.ef-stage__head h2 {
	margin: 0 0 4px;
	color: var(--ef-navy);
	font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.ef-stage__desc {
	margin: 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.7;
}

.ef-stage--middle .ef-stage__icon {
	background: #ecfdf5;
}

.ef-stage--secondary .ef-stage__icon {
	background: #fef3c7;
}

.ef-grade-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
}

.ef-grade-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border: 1px solid #e2e8f0;
	border-radius: 15px;
	background: #f8fafc;
	color: var(--ef-navy);
	text-decoration: none;
	transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.ef-grade-card:hover {
	border-color: #bfdbfe;
	background: #ffffff;
	box-shadow: 0 20px 40px -34px rgba(37, 99, 235, .45);
	transform: translateY(-2px);
}

.ef-grade-card__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #dbeafe;
	color: #1d4ed8;
	font-size: 18px;
	font-weight: 800;
}

.ef-stage--middle .ef-grade-card__num {
	background: #d1fae5;
	color: #047857;
}

.ef-stage--secondary .ef-grade-card__num {
	background: #fef3c7;
	color: #b45309;
}

.ef-grade-card__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.ef-grade-card__body strong {
	color: var(--ef-navy);
	font-size: 13px;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.ef-grade-card__body small {
	color: #64748b;
	font-size: 11px;
	overflow-wrap: anywhere;
}

.ef-grade-card .ef-icon {
	color: #94a3b8;
	flex: none;
}

/* Grade page --------------------------------------------------------------- */
.ef-grade-page {
	display: grid;
	gap: 30px;
}

.ef-grade-hero {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: clamp(16px, 2.6vw, 28px);
	padding: clamp(18px, 3vw, 30px);
	border: 1px solid #dbeafe;
	border-top: 4px solid var(--ef-primary);
	border-radius: 22px;
	background:
		radial-gradient(ellipse at 100% 0%, rgba(37, 99, 235, .12), transparent 48%),
		linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	box-shadow: 0 26px 56px -48px rgba(15, 23, 42, .55);
}

.ef-grade-hero--middle {
	border-top-color: #0f766e;
}

.ef-grade-hero--secondary {
	border-top-color: #b45309;
}

.ef-grade-hero__badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 96px;
	height: 96px;
	border-radius: 24px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1d4ed8;
}

.ef-grade-hero--middle .ef-grade-hero__badge {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #047857;
}

.ef-grade-hero--secondary .ef-grade-hero__badge {
	background: #fffbeb;
	border-color: #fde68a;
	color: #b45309;
}

.ef-grade-hero__num {
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
}

.ef-grade-hero__cap {
	font-size: 12px;
	font-weight: 700;
	opacity: .8;
}

.ef-grade-hero__body h1 {
	margin: 0 0 8px;
	color: var(--ef-navy);
	font-size: clamp(1.35rem, 2.8vw, 2rem);
	line-height: 1.35;
}

.ef-grade-hero__desc {
	margin: 0 0 12px;
	color: #475569;
	font-size: 13.5px;
	line-height: 1.8;
}

.ef-grade-hero__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ef-grade-hero__terms a {
	padding: 5px 11px;
	border: 1px solid #dbeafe;
	border-radius: 999px;
	background: #ffffff;
	color: #1e40af;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.ef-grade-hero__terms a:hover {
	border-color: var(--ef-primary);
	background: #eff6ff;
}

.ef-grade-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ef-grade-hero__stats li {
	display: flex;
	flex-direction: column;
	min-width: 92px;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #ffffff;
	text-align: center;
}

.ef-grade-hero__stats strong {
	color: var(--ef-indigo);
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
}

.ef-grade-hero__stats span {
	color: #64748b;
	font-size: 11.5px;
}

.ef-term-sections {
	display: grid;
	gap: 26px;
}

.ef-term-section {
	scroll-margin-top: 110px;
	padding: clamp(16px, 2.4vw, 24px);
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	background: #ffffff;
	box-shadow: 0 24px 54px -50px rgba(15, 23, 42, .55);
}

.ef-term-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.ef-term-section__head h2 {
	margin: 0;
	color: var(--ef-navy);
	font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.ef-term-section__actions {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ef-term-section__count {
	padding: 4px 10px;
	border-radius: 999px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 11.5px;
	font-weight: 700;
}

.ef-term-section__empty {
	margin: 14px 0 0;
	padding: 14px;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	background: #f8fafc;
	color: #64748b;
	font-size: 13px;
	text-align: center;
}

.ef-subject-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 10px;
	margin-bottom: 18px;
}

.ef-subject-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #f8fafc;
	color: var(--ef-navy);
	text-decoration: none;
	transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.ef-subject-card:hover {
	border-color: #bfdbfe;
	background: #eff6ff;
	transform: translateY(-1px);
}

.ef-subject-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: #ffffff;
	font-size: 19px;
	line-height: 1;
	font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.ef-subject-card__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.ef-subject-card__body strong {
	font-size: 12.5px;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.ef-subject-card__body small {
	color: #64748b;
	font-size: 11px;
	overflow-wrap: anywhere;
}

.ef-subject-card .ef-icon {
	color: #94a3b8;
	flex: none;
}

/* Grade file browser ------------------------------------------------------- */
.ef-grade-files {
	scroll-margin-top: 110px;
	padding: clamp(18px, 2.6vw, 26px);
	border: 1px solid #e2e8f0;
	border-radius: 22px;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.ef-grade-files__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.ef-grade-files__head h2 {
	margin: 0 0 4px;
	color: var(--ef-navy);
	font-size: clamp(1.2rem, 2.2vw, 1.5rem);
}

.ef-grade-files__hint {
	margin: 0;
	color: #64748b;
	font-size: 12.5px;
}

.ef-grade-files__count {
	padding: 6px 14px;
	border-radius: 999px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 12.5px;
	font-weight: 800;
}

.ef-grade-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-bottom: 18px;
	padding: 14px;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	background: #ffffff;
}

.ef-grade-filter {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1 1 150px;
	max-width: 100%;
	min-width: 0;
}

.ef-grade-filter > span {
	color: #475569;
	font-size: 11.5px;
	font-weight: 700;
}

.ef-grade-filter select,
.ef-grade-filter input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	background: #ffffff;
	color: var(--ef-navy);
	font: inherit;
	font-size: 12.5px;
}

.ef-grade-filters__actions {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	gap: 6px;
}

.ef-grade-reset {
	color: #64748b;
	font-size: 11.5px;
	text-align: center;
	text-decoration: underline;
}

.ef-grade-neighbors {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 8px;
}

.ef-grade-neighbor {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #ffffff;
	color: var(--ef-navy);
	text-decoration: none;
	transition: border-color .16s ease, transform .16s ease;
}

.ef-grade-neighbor:hover {
	border-color: #bfdbfe;
	transform: translateY(-1px);
}

.ef-grade-neighbor span {
	color: #64748b;
	font-size: 11px;
}

.ef-grade-neighbor strong {
	font-size: 13.5px;
}

.ef-grade-neighbor--hub {
	align-items: center;
	justify-content: center;
	color: #1d4ed8;
	font-size: 12.5px;
	font-weight: 700;
}

/* Grades template ---------------------------------------------------------- */
.ef-grades-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) auto;
	align-items: center;
	gap: clamp(20px, 4vw, 44px);
	margin-bottom: 28px;
	padding: clamp(20px, 3.4vw, 36px);
	border: 1px solid #dbeafe;
	border-radius: 24px;
	background:
		radial-gradient(ellipse at 100% 0%, rgba(37, 99, 235, .14), transparent 50%),
		linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
	box-shadow: 0 30px 64px -52px rgba(15, 23, 42, .55);
}

.ef-grades-hero h1 {
	margin: 0 0 12px;
	color: var(--ef-navy);
	font-size: clamp(1.55rem, 3.2vw, 2.25rem);
	line-height: 1.35;
}

.ef-grades-hero__lead {
	max-width: 720px;
	margin: 0 0 18px;
	color: #475569;
	font-size: 14px;
	line-height: 1.9;
}

.ef-grades-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ef-grades-hero__stats {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ef-grades-hero__stats li {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid #dbeafe;
	border-radius: 14px;
	background: #ffffff;
}

.ef-grades-hero__stats strong {
	color: #1d4ed8;
	font-size: 22px;
	font-weight: 800;
}

.ef-grades-hero__stats span {
	color: #64748b;
	font-size: 12px;
}

.ef-grades-editorial {
	margin-bottom: 24px;
}

.ef-grades-libraries {
	margin-top: 34px;
}

.ef-home-grades,
.ef-home-libraries,
.ef-home-latest {
	scroll-margin-top: 100px;
}

.ef-grade-editorial {
	margin-top: 26px;
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1080px) {
	.ef-grade-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ef-grade-hero {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.ef-grade-hero__stats {
		grid-column: 1 / -1;
	}
}

@media (max-width: 900px) {
	.ef-hero--grades .ef-hero__inner,
	.ef-grades-hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.ef-grades-hero__stats {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.ef-grade-filters__actions {
		flex-basis: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

@media (max-width: 720px) {
	.ef-grade-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ef-grade-hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.ef-grade-hero__badge {
		width: 74px;
		height: 74px;
		border-radius: 20px;
	}

	.ef-grade-hero__num {
		font-size: 26px;
	}

	.ef-oman-grid--grade {
		grid-template-columns: minmax(0, 1fr);
	}

	.ef-grade-neighbors {
		flex-direction: column;
	}
}

@media (max-width: 520px) {
	.ef-grade-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ef-grade-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.ef-grade-filter {
		flex: 0 0 auto;
		width: 100%;
	}

	.ef-hero--grades .ef-hero__stats {
		flex-wrap: wrap;
	}
}

/* ==========================================================================
   Article extras – discovery, related posts, share and navigation
   ========================================================================== */

/* Tags --------------------------------------------------------------------- */
.ef-tags {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 12px;
	margin: 24px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--ef-border, #e2e8f0);
	border-radius: 16px;
	background: linear-gradient(180deg, #f8fafc 0%, #ffffff 70%);
	box-shadow: 0 16px 34px -34px rgba(15, 23, 42, .45);
}

.ef-tags__label {
	display: inline-flex;
	align-items: center;
	flex: none;
	gap: 6px;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--ef-navy, #0f172a);
	color: #ffffff;
	font-size: 11.5px;
	font-weight: 800;
	line-height: 1.4;
}

.ef-tags__label .ef-icon {
	width: 14px;
	height: 14px;
}

.ef-tags__list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ef-tags__list li {
	margin: 0;
	padding: 0;
}

.ef-tags__list a {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 5px 12px;
	border: 1px solid #dbeafe;
	border-radius: 999px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.ef-tags__list a::before {
	content: "#";
	margin-inline-end: 3px;
	color: rgba(29, 78, 216, .55);
	font-weight: 800;
}

.ef-tags__list a:hover,
.ef-tags__list a:focus-visible {
	border-color: var(--ef-primary, #2563eb);
	background: var(--ef-primary, #2563eb);
	color: #ffffff;
	box-shadow: 0 10px 20px -14px rgba(37, 99, 235, .85);
	transform: translateY(-1px);
}

.ef-tags__list a:hover::before,
.ef-tags__list a:focus-visible::before {
	color: rgba(255, 255, 255, .8);
}

.ef-tags__list a:focus-visible {
	outline: 2px solid #93c5fd;
	outline-offset: 2px;
}

.ef-single--form .ef-tags {
	margin-bottom: 4px;
}

@media (max-width: 520px) {
	.ef-tags {
		gap: 8px;
		padding: 12px;
	}

	.ef-tags__label {
		font-size: 11px;
	}

	.ef-tags__list a {
		padding-block: 4px;
		font-size: 11.5px;
	}
}

@media print {
	.ef-tags {
		display: none;
	}
}

.ef-post-discovery {
	margin: 30px 0;
}

.ef-post-discovery__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	min-width: 0;
}

.ef-post-discovery__col {
	min-width: 0;
	padding: 16px;
	border: 1px solid var(--ef-border, #e2e8f0);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: var(--ef-shadow-sm, 0 1px 2px rgba(15, 23, 42, .05));
}

.ef-post-discovery__heading {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 12px;
	color: var(--ef-navy, #0f172a);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.4;
}

.ef-post-discovery .ef-widget-popular {
	gap: 12px;
}

.ef-post-discovery .ef-widget-popular a {
	overflow-wrap: anywhere;
}

.ef-single .ef-share {
	margin: 22px 0 0;
}

.ef-single .ef-related {
	min-width: 0;
}

.ef-single .post-navigation {
	margin: 28px 0 0;
}

.ef-single .post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ef-single .post-navigation a {
	display: block;
	height: 100%;
	padding: 13px 15px;
	border: 1px solid var(--ef-border, #e2e8f0);
	border-radius: 14px;
	background: #ffffff;
	color: var(--ef-navy, #0f172a);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: border-color .16s ease, background .16s ease;
}

.ef-single .post-navigation a:hover {
	border-color: #bfdbfe;
	background: #eff6ff;
	color: var(--ef-primary, #2563eb);
}

.ef-single .post-navigation a span {
	display: block;
	margin-bottom: 3px;
	color: #64748b;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .2px;
}

.ef-single .post-navigation .nav-next {
	text-align: end;
}

@media (max-width: 760px) {
	.ef-post-discovery__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ef-single .post-navigation .nav-links {
		grid-template-columns: minmax(0, 1fr);
	}

	.ef-single .post-navigation .nav-next {
		text-align: start;
	}
}
