/* Evalumax homepage — scoped under .em-home */
.public-quiz-brand-evalumax:has(.em-home) {
  overflow-x: hidden;
}

.em-home {
  --em-primary: #4f46e5;
  --em-primary-dark: #3730a3;
  --em-accent: #f59e0b;
  --em-ink: #0f172a;
  --em-muted: #64748b;
  --em-line: #e2e8f0;
  --em-soft: #f8fafc;
  --em-green: #059669;
  overflow-x: clip;
  color: var(--em-ink);
}

.em-home section[id],
.em-home #quizLibrary {
  scroll-margin-top: 0.75rem;
}

.em-home.em-library .em-nav.bp-landing-nav {
  position: sticky;
  top: 0;
  background: #312e81;
  z-index: 1030;
}

.em-home.em-library section[id],
.em-home.em-library #quizLibrary,
.em-home.em-library #board-prep {
  scroll-margin-top: 4.75rem;
}

.em-home.em-library .em-academic.em-section {
  padding-top: calc(2.5rem + env(safe-area-inset-top, 0px));
}

.em-home img,
.em-home svg {
  max-width: 100%;
  height: auto;
}

.em-kicker {
  display: inline-block;
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c7d2fe;
}

.em-kicker--dark {
  color: var(--em-primary);
}

.em-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 250ms ease, color 250ms ease, transform 250ms ease, box-shadow 250ms ease;
}

.em-btn--primary {
  background: var(--em-primary);
  color: #fff;
}

.em-btn--primary:hover,
.em-btn--primary:focus {
  background: var(--em-primary-dark);
  color: #fff;
}

.em-btn--accent {
  background: var(--em-accent);
  color: #1e1b4b;
}

.em-btn--accent:hover,
.em-btn--accent:focus {
  background: #d97706;
  color: #1e1b4b;
}

.em-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.em-btn--ghost:hover,
.em-btn--ghost:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.em-btn--ghost-dark {
  background: #fff;
  color: var(--em-primary);
  border-color: #c7d2fe;
}

.em-btn--ghost-dark:hover,
.em-btn--ghost-dark:focus {
  background: #eef2ff;
  color: var(--em-primary-dark);
}

.em-section {
  padding: 4rem 0;
}

.em-section--muted {
  background: var(--em-soft);
}

.em-section__head {
  max-width: 40rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.em-section__head--left {
  margin-left: 0;
  text-align: left;
}

.em-section__head h2,
.em-section__head--light h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}

.em-section__head p {
  margin: 0;
  color: var(--em-muted);
  font-size: 1.02rem;
}

.em-section__note {
  color: var(--em-muted);
  max-width: 40rem;
  margin: 1.25rem auto 1.5rem;
  text-align: center;
}

.em-section__head--left + .em-checklist,
.em-split .em-section__note {
  text-align: left;
  margin-left: 0;
}

/* Hero */
.em-hero {
  position: relative;
  padding: 6.5rem 0 3.5rem;
  background:
    radial-gradient(circle at 50% 6rem, rgba(79, 70, 229, 0.14), transparent 42%),
    linear-gradient(180deg, #312e81 0, #4f46e5 5.25rem, #eef2ff 5.3rem, #f8fafc 100%);
  color: var(--em-ink);
  border-bottom: 1px solid #e0e7ff;
  overflow: hidden;
}

.em-hero__content {
  --em-ui-stack-gap: 1.25rem;
  max-width: 54rem;
  margin-inline: auto;
  align-items: center;
  text-align: center;
  animation: emRise 0.4s ease both;
}

@keyframes emRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.em-hero__eyebrow.em-ui-eyebrow {
  margin: 0;
}

.em-hero__title.em-ui-display {
  max-width: 13ch;
  margin: 0;
  color: var(--em-ink);
}

.em-hero__title span {
  display: block;
  color: var(--em-primary);
}

.em-hero__lead.em-ui-text {
  max-width: 43rem;
  margin: 0;
  color: var(--em-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.em-hero__ctas {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

.em-hero__ctas .em-ui-btn--primary {
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.2);
}

.em-hero__stats.em-ui-card {
  width: 100%;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  list-style: none;
  background: var(--em-ui-border);
  overflow: hidden;
}

.em-hero__stats li {
  min-width: 0;
  padding: 0.9rem 0.65rem;
  background: rgba(255, 255, 255, 0.92);
}

.em-hero__stats strong {
  display: block;
  color: var(--em-primary);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.em-hero__stats span {
  display: block;
  margin-top: 0.15rem;
  color: var(--em-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Shared action row used by non-hero homepage sections. */
.em-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.em-hero__actions .em-btn--primary {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.em-hero__actions .em-btn--ghost {
  border-color: rgba(255, 255, 255, 0.72);
}

/* Guided preparation path */
.em-prepare {
  position: relative;
  background: #fff;
}

.em-prepare__legacy-anchor {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  scroll-margin-top: 0.75rem;
}

.em-prepare [hidden] {
  display: none !important;
}

.em-prepare__options.em-ui-grid {
  max-width: 70rem;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr);
}

.em-prepare-card.em-ui-card {
  min-height: var(--em-ui-control-height);
  padding: 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
}

a.em-prepare-card {
  text-decoration: none;
  color: inherit;
}

.em-prepare-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.em-prepare-card__arrow {
  color: var(--em-ui-primary);
  transition: transform var(--em-ui-transition);
}

.em-prepare-card:hover .em-prepare-card__arrow,
.em-prepare-card:focus-visible .em-prepare-card__arrow {
  transform: translateX(3px);
}

.em-prepare__selection.em-ui-card {
  max-width: 54rem;
  margin: 0 auto 1rem;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--em-ui-primary-soft);
  border-color: var(--em-ui-primary-border);
  box-shadow: none;
}

.em-prepare__selection .em-ui-eyebrow,
.em-prepare__selection .em-ui-card-title {
  margin: 0;
}

.em-prepare__panel.em-ui-card {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-color: var(--em-ui-primary-border);
  box-shadow: none;
}

.em-prepare__panel:focus-visible {
  outline: 0;
  box-shadow: var(--em-ui-focus-ring);
}

.em-prepare__panel > .em-ui-heading {
  margin-bottom: 0.5rem;
  font-size: var(--em-ui-font-size-xl);
}

.em-prepare__panel > .em-ui-text {
  margin: 0 0 1rem;
}

.em-prepare__next-grid.em-ui-grid {
  --em-ui-grid-min: 12rem;
  margin-top: 1rem;
}

.em-prepare-next.em-ui-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.em-home [data-em-prepare-board-content][hidden] {
  display: none !important;
}

.em-prepare__panel[hidden]:target,
.em-home #board-prep[hidden]:target,
.em-home #quiz-types[hidden]:target {
  display: block !important;
}

/* Board -> Class -> Subject -> Quiz Type */
.em-academic {
  position: relative;
  background: var(--em-ui-surface-subtle);
}

.em-academic [hidden] {
  display: none !important;
}

.em-academic__legacy-anchor {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  scroll-margin-top: 0.75rem;
}

.em-home .em-academic:has(#quiz-types:target)[hidden] {
  display: block !important;
}

.em-academic__progress {
  max-width: 54rem;
  margin: 0 auto 1.25rem;
}

.em-academic__progress ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.em-academic__progress button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0.45rem 0.3rem;
  border: 1px solid var(--em-ui-border);
  border-radius: var(--em-ui-radius-md);
  background: var(--em-ui-surface);
  color: var(--em-ui-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.em-academic__progress button > span {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--em-ui-surface-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.4rem;
}

.em-academic__progress button[aria-current="step"] {
  border-color: var(--em-ui-primary);
  background: var(--em-ui-primary-soft);
  color: var(--em-ui-primary-hover);
}

.em-academic__progress button.is-complete {
  border-color: var(--em-ui-primary-border);
  color: var(--em-ui-primary);
  cursor: pointer;
}

.em-academic__progress button:disabled {
  opacity: 0.7;
}

.em-academic__progress button:focus-visible {
  outline: 0;
  box-shadow: var(--em-ui-focus-ring);
}

.em-academic__toolbar {
  max-width: 70rem;
  min-height: var(--em-ui-control-height);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.em-academic__selection {
  min-width: 0;
  margin: 0;
  color: var(--em-ui-text-secondary);
  font-size: var(--em-ui-font-size-sm);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.em-academic__step {
  max-width: 70rem;
  margin-inline: auto;
  scroll-margin-top: 1rem;
}

.em-academic__step:focus-visible {
  outline: 0;
  box-shadow: var(--em-ui-focus-ring);
  border-radius: var(--em-ui-radius-lg);
}

.em-academic__step-head {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.em-academic__step-head .em-ui-eyebrow,
.em-academic__step-head .em-ui-heading,
.em-academic__step-head .em-ui-text {
  margin-top: 0;
}

.em-academic__step-head .em-ui-heading {
  margin-bottom: 0.35rem;
  font-size: var(--em-ui-font-size-xl);
}

.em-academic__step-head .em-ui-text {
  margin-bottom: 0;
}

.em-academic__grid.em-ui-grid {
  grid-template-columns: minmax(0, 1fr);
}

.em-academic-card.em-ui-card {
  min-width: 0;
  padding: 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
}

.em-academic-card__logo {
  overflow: hidden;
}

.em-academic-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.em-academic-card__body {
  min-width: 0;
}

.em-academic-card__arrow,
.em-academic-option__arrow {
  align-self: center;
  color: var(--em-ui-primary);
}

.em-academic__upcoming {
  margin-top: 1.25rem;
  border: 1px solid var(--em-ui-border);
  border-radius: var(--em-ui-radius-lg);
  background: var(--em-ui-surface);
}

.em-academic__upcoming summary {
  min-height: 48px;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--em-ui-text);
  font-weight: 800;
  cursor: pointer;
}

.em-academic__upcoming summary:focus-visible {
  outline: 0;
  box-shadow: var(--em-ui-focus-ring);
  border-radius: var(--em-ui-radius-lg);
}

.em-academic__upcoming-grid {
  padding: 0 1rem 1rem;
}

.em-academic-upcoming-card.em-ui-card {
  box-shadow: none;
}

.em-academic-option.em-ui-card {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 0.9rem 1rem;
  border-width: 1px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  font-family: var(--em-ui-font-family);
  text-align: left;
}

.em-academic-option .em-ui-text-small {
  grid-column: 1;
}

.em-academic-option__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.em-academic-type-card.em-ui-card {
  min-height: 96px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: center;
}

.em-academic-type-card__icon {
  grid-column: 1;
  grid-row: 1;
}

.em-academic-type-card__body {
  min-width: 0;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.em-academic-type-card > .em-ui-badge {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
}

.em-academic__empty.em-ui-card {
  padding: 1rem;
  text-align: center;
  box-shadow: none;
}

.em-academic__empty .em-ui-text-small {
  display: block;
  margin: 0.4rem 0 1rem;
}

/* Evalumax final quiz cards only */
.em-home .bp-quiz-card--evalumax:not(.card) {
  border-radius: var(--em-ui-radius-lg);
  border-color: var(--em-ui-border);
  box-shadow: var(--em-ui-shadow-sm);
}

.em-home .bp-quiz-card--evalumax:not(.card):hover {
  transform: translateY(-2px);
  box-shadow: var(--em-ui-shadow-md);
  border-color: var(--em-ui-primary-border);
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__header {
  padding: 0.7rem 0.75rem;
  background: var(--em-ui-surface);
  border-top: 3px solid var(--subject-color, var(--em-ui-primary));
  border-bottom-color: var(--em-ui-border);
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__watermark {
  display: none;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__header-main {
  align-items: center;
  gap: 0.55rem;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--em-ui-radius-sm);
  box-shadow: none;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__subject {
  color: var(--subject-color, var(--em-ui-primary));
  font-size: 0.75rem;
  -webkit-line-clamp: 1;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__badges {
  gap: 0.25rem;
  margin-top: 0.3rem;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__badge {
  padding: 0.12rem 0.45rem;
  background: var(--em-ui-surface-subtle);
  border: 1px solid var(--em-ui-border);
  color: var(--em-ui-text-secondary);
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__badge--type {
  background: var(--em-ui-primary-soft);
  border-color: var(--em-ui-primary-border);
  color: var(--em-ui-primary-hover);
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card__badge--board {
  background: var(--em-ui-surface);
  color: var(--em-ui-text-secondary);
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card-body {
  padding: 0.75rem 0.8rem 0.8rem;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card-title,
.em-home .bp-quiz-card--compact.bp-quiz-card--evalumax .bp-quiz-card-title {
  min-height: 0;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card-desc {
  display: none;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-meta {
  margin-bottom: 0.7rem;
  gap: 0.6rem;
}

.em-home .bp-quiz-card--evalumax .bp-quiz-card-actions .bp-btn-primary {
  min-height: var(--em-ui-control-height);
  border-radius: var(--em-ui-radius-md);
}

.em-home .bp-quiz-card--evalumax .bp-quiz-more__btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

/* Categories */
.em-cat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.em-cat-card {
  display: block;
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 18px;
  padding: 1.35rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 250ms ease, box-shadow 250ms ease;
  min-width: 0;
}

.em-cat-card:hover,
.em-cat-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.12);
  color: inherit;
}

.em-cat-card__icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--em-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.em-cat-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}

.em-cat-card p {
  color: var(--em-muted);
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.em-cat-card ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: #334155;
  font-size: 0.88rem;
}

.em-cat-card__go {
  font-weight: 700;
  color: var(--em-primary);
  font-size: 0.88rem;
}

/* Choose your Board */
.em-board-province + .em-board-province {
  margin-top: 1.5rem;
}

.em-board-province h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--em-ink);
}

.em-board-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.em-board-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 16px;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

a.em-board-card:hover,
a.em-board-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.12);
  color: inherit;
}

.em-board-card--soon {
  opacity: 0.72;
  box-shadow: none;
  cursor: default;
}

.em-board-card__mark {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--em-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  overflow: hidden;
}

.em-board-card__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.em-board-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.em-board-card strong {
  font-size: 0.92rem;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.em-board-card__city,
.em-board-card__code,
.em-board-card__count,
.em-board-card__soon {
  color: var(--em-muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.em-board-card__soon {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.em-upcoming-boards {
  margin-top: 1.5rem;
  border: 1px solid var(--em-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
}

.em-upcoming-boards summary {
  min-height: 48px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--em-ink);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.em-upcoming-boards summary::-webkit-details-marker {
  display: none;
}

.em-upcoming-boards summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-left: auto;
  border-right: 2px solid var(--em-primary);
  border-bottom: 2px solid var(--em-primary);
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

.em-upcoming-boards[open] summary::after {
  transform: rotate(225deg);
}

.em-upcoming-boards summary:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.28);
  outline-offset: 3px;
}

.em-upcoming-boards__count {
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--em-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.em-upcoming-boards__grid {
  padding: 0 1rem 1rem;
}

/* Quiz types */
.em-path-scroller {
  position: relative;
  margin-bottom: 0.5rem;
}

.em-path-scroller__viewport {
  position: relative;
}

.em-path-scroller__viewport::before,
.em-path-scroller__viewport::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0.75rem;
  width: 2.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.em-path-scroller__viewport::before {
  left: 0;
  background: linear-gradient(90deg, #fff 10%, rgba(255, 255, 255, 0));
}

.em-path-scroller__viewport::after {
  right: 0;
  background: linear-gradient(270deg, #fff 10%, rgba(255, 255, 255, 0));
}

.em-path-scroller.can-scroll-left .em-path-scroller__viewport::before,
.em-path-scroller.can-scroll-right .em-path-scroller__viewport::after {
  opacity: 1;
}

.em-path {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 0.25rem 3rem 0.75rem;
  scroll-padding-inline: 3rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.em-path::-webkit-scrollbar {
  display: none;
}

.em-path__step {
  flex: 0 0 auto;
  min-width: 8.5rem;
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  scroll-snap-align: start;
}

.em-path__step strong {
  display: block;
  font-size: 0.92rem;
}

.em-path__step span {
  color: var(--em-muted);
  font-size: 0.78rem;
}

.em-path:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.28);
  outline-offset: 3px;
}

.em-path-scroller__control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid #c7d2fe;
  border-radius: 50%;
  background: #fff;
  color: var(--em-primary);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.13);
  transform: translateY(-58%);
}

.em-path-scroller.is-scrollable .em-path-scroller__control {
  display: inline-flex;
}

.em-path-scroller__control--prev {
  left: 0.15rem;
}

.em-path-scroller__control--next {
  right: 0.15rem;
}

.em-path-scroller__control:disabled {
  opacity: 0;
  pointer-events: none;
}

.em-path-scroller__control:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.3);
  outline-offset: 2px;
}

.em-path-scroller__dots {
  min-height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.em-path-scroller.is-scrollable .em-path-scroller__dots {
  display: flex;
}

.em-path-scroller__dots button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
}

.em-path-scroller__dots button::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: inset 180ms ease, background 180ms ease;
}

.em-path-scroller__dots button[aria-current="true"]::after {
  inset: 6px;
  background: var(--em-primary);
}

.em-path-scroller__dots button:focus-visible {
  outline: 2px solid var(--em-primary);
  outline-offset: 1px;
  border-radius: 50%;
}

/* Modes */
.em-modes {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
}

.em-modes > li {
  min-width: 0;
}

.em-mode {
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 18px;
  padding: 1.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.em-mode:hover,
.em-mode:focus-visible {
  color: inherit;
  border-color: #a5b4fc;
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.12);
  transform: translateY(-2px);
}

.em-mode:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.28);
  outline-offset: 3px;
}

.em-mode__num {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-weight: 800;
  color: #c7d2fe;
}

.em-mode__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--em-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.em-mode h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}

.em-mode p {
  margin: 0;
  color: var(--em-muted);
  font-size: 0.94rem;
  flex-grow: 1;
}

.em-mode__action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--em-primary);
  font-size: 0.86rem;
  font-weight: 800;
}

.em-mode-library-cue {
  width: calc(100% - 1.5rem);
  max-width: 82.5rem;
  margin: 0 auto 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid #a5b4fc;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--em-primary-dark);
  font-weight: 700;
  text-align: center;
}

.em-mode-library-cue[hidden] {
  display: none;
}

.em-mode-target .em-mode-library-cue {
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Split / mock dashboards */
.em-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.em-checklist {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.em-checklist li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.6rem;
}

.em-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--em-green);
}

.em-checklist--grid {
  display: grid;
  gap: 0 1rem;
  margin-top: 1.5rem;
}

.em-mock,
.em-plan-mock,
.em-exam-paper {
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  min-width: 0;
}

.em-mock__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--em-muted);
  margin: 0 0 1rem;
}

.em-mock__ring {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  border: 10px solid #eef2ff;
  border-top-color: var(--em-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.em-mock__ring strong {
  font-size: 1.5rem;
}

.em-mock__ring span {
  font-size: 0.7rem;
  color: var(--em-muted);
  padding: 0 0.4rem;
}

.em-mock__bars {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.em-mock__bars li {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
}

.em-mock__bars b {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.em-mock__bars b::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--em-w, 50%);
  background: var(--em-primary);
  border-radius: inherit;
}

.em-mock__weak,
.em-mock__plan {
  font-size: 0.85rem;
  color: var(--em-muted);
  margin: 0 0 0.4rem;
}

.em-plan-mock article {
  background: var(--em-soft);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.em-plan-mock h3 {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

.em-plan-mock ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
  font-size: 0.9rem;
}

/* Cadet */
.em-section--cadet {
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
}

.em-section--cadet .em-section__head p,
.em-section--cadet .em-kicker {
  color: #c7d2fe;
}

.em-section--cadet h2 {
  color: #fff;
}

.em-chip-row,
.em-subject-pills,
.em-cadet-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  justify-content: center;
}

.em-chip-row li,
.em-subject-pills li {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

.em-cadet-points li {
  font-size: 0.9rem;
  color: #e0e7ff;
}

.em-section--cadet .em-btn--primary {
  display: inline-flex;
}

.em-section--cadet .em-section__head + .em-chip-row,
.em-section--cadet .btn {
  display: flex;
  justify-content: center;
}

.em-section--cadet > .container > .btn {
  margin-left: auto;
  margin-right: auto;
}

/* Learn cycle */
.em-cycle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.em-cycle li {
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.em-section--muted .em-hero__actions {
  justify-content: center;
}

.em-section__head--left ~ .em-hero__actions,
.em-split .em-hero__actions {
  justify-content: flex-start;
}

/* Paper */
.em-exam-paper__school {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--em-muted);
  margin: 0 0 0.25rem;
}

.em-exam-paper h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.em-exam-paper__meta {
  font-size: 0.85rem;
  color: var(--em-muted);
  margin: 0 0 1rem;
}

.em-exam-paper__sec {
  border-top: 1px dashed var(--em-line);
  padding: 0.7rem 0;
  font-size: 0.92rem;
}

.em-paper-flow,
.em-school-steps,
.em-timeline {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.em-paper-flow li {
  padding: 0.45rem 0 0.45rem 1.6rem;
  position: relative;
}

.em-paper-flow li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.85rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--em-primary);
}

.em-school-steps {
  display: grid;
  gap: 1rem;
}

.em-school-steps li {
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 16px;
  padding: 1.1rem;
}

.em-school-steps span {
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--em-primary);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.em-school-steps h3 {
  font-size: 1rem;
  margin: 0 0 0.3rem;
}

.em-school-steps p {
  margin: 0;
  color: var(--em-muted);
  font-size: 0.9rem;
}

.em-timeline {
  display: grid;
  gap: 0;
  max-width: 36rem;
  margin: 0 auto;
}

.em-timeline li {
  padding: 0 0 1.25rem 1.5rem;
  border-left: 2px solid #c7d2fe;
  position: relative;
}

.em-timeline li:last-child {
  padding-bottom: 0;
}

.em-timeline li::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  top: 0.25rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--em-primary);
}

.em-timeline strong {
  display: block;
  margin-bottom: 0.15rem;
}

.em-timeline span {
  color: var(--em-muted);
  font-size: 0.92rem;
}

.em-share-visual {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.em-share-visual span {
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.em-quotes {
  display: grid;
  gap: 1rem;
}

.em-quote {
  background: #fff;
  border: 1px solid var(--em-line);
  border-radius: 18px;
  padding: 1.25rem;
  margin: 0;
}

.em-quote p {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.em-quote footer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.em-quote img {
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

.em-quote strong {
  display: block;
  font-size: 0.9rem;
}

.em-quote span {
  color: var(--em-muted);
  font-size: 0.8rem;
}

.em-stats-band {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  color: #fff;
  padding: 3rem 0;
}

.em-section__head--light {
  margin-bottom: 1.5rem;
}

.em-section__head--light h2 {
  color: #fff;
}

.em-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.em-stats strong {
  display: block;
  font-size: 1.6rem;
}

.em-stats span {
  color: #c7d2fe;
  font-size: 0.85rem;
}

.em-personalize .em-ui-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}

.em-personalize .em-ui-btn {
  align-self: flex-start;
  margin-top: auto;
}

.em-final-cta {
  padding: 4rem 0;
  background: #fffbeb;
}

.em-final-cta h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 1.75rem;
}

.em-schools-strip {
  background: var(--em-ui-primary-soft, #eef2ff);
  border-block: 1px solid var(--em-ui-primary-border, #c7d2fe);
}

.em-schools-strip__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.em-schools-strip .em-ui-eyebrow {
  margin-bottom: 0.25rem;
}

.em-schools-strip__line {
  margin: 0;
  color: var(--em-ui-text, #0f172a);
  font-weight: 600;
}

.em-final-cta__grid {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
  margin-inline: auto;
}

.em-final-cta article {
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 18px;
  padding: 1.4rem;
}

.em-final-cta .em-kicker {
  color: #b45309;
}

.em-final-cta h3 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.em-home .em-popular-grid.bp-quiz-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
  grid-template-columns: 1fr;
  justify-content: stretch;
}

.em-home .em-popular-grid .bp-quiz-card {
  min-width: 0;
  width: 100%;
}

.em-home #quizLibrary {
  padding-top: 3.5rem;
}

.em-home .em-section > .container > .btn,
.em-home .em-section--cadet > .container > .btn {
  display: inline-flex;
}

.em-home .em-section__head + .btn,
.em-home .em-modes + .btn,
.em-home .em-popular-grid + .btn,
.em-home .em-checklist--grid + .btn,
.em-home .em-path-scroller + .em-section__note + .btn {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.em-split .btn {
  width: fit-content;
}

@media (min-width: 480px) and (max-width: 767.98px) {
  .em-academic__grid--types.em-ui-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .em-hero__stats.em-ui-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .em-prepare__options.em-ui-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-academic__grid.em-ui-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-home .em-popular-grid.bp-quiz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-board-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .em-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-split {
    grid-template-columns: 1fr 1fr;
  }

  .em-split--reverse {
    direction: rtl;
  }

  .em-split--reverse > * {
    direction: ltr;
  }

  .em-checklist--grid {
    grid-template-columns: 1fr 1fr;
  }

  .em-school-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-quotes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .em-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .em-final-cta__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .em-hero {
    padding: 7.5rem 0 4.5rem;
  }

  .em-prepare__options.em-ui-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-academic__grid.em-ui-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .em-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .em-home .em-popular-grid.bp-quiz-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .em-board-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .em-modes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .em-school-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .em-hero {
    padding: 5.25rem 0 2rem;
  }

  .em-home .em-section,
  .em-home .em-final-cta,
  .em-home .em-stats-band {
    padding: 2.5rem 0;
  }

  .em-home .em-final-cta .em-btn,
  .em-home .em-final-cta .btn {
    width: 100%;
  }

  .em-mock__bars li {
    grid-template-columns: 1fr auto;
  }

  .em-mock__bars b {
    grid-column: 1 / -1;
  }

  .em-quotes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) and (orientation: landscape) {
  .em-home .em-hero {
    padding: 4.5rem 0 1.25rem;
  }

  .em-home .em-section,
  .em-home .em-final-cta,
  .em-home .em-stats-band {
    padding: 1.5rem 0;
  }

  .em-academic__progress {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .em-prepare__selection.em-ui-card {
    align-items: stretch;
    flex-direction: column;
  }

  .em-prepare__selection .em-ui-btn {
    width: 100%;
  }

  .em-academic__toolbar,
  .em-academic__step-head {
    align-items: stretch;
    flex-direction: column;
  }

  .em-academic__toolbar .em-ui-btn {
    width: 100%;
  }

  .em-academic__progress ol {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .em-academic__progress li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .em-academic__progress button {
    width: auto;
    min-width: 7.5rem;
    flex-direction: row;
    font-size: 0.75rem;
  }
}

@media (max-width: 430px) {
  .em-academic-type-card.em-ui-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .em-academic-type-card > .em-ui-badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  .em-hero__actions .btn,
  .em-split .btn,
  .em-final-cta .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .em-home *,
  .em-home *::before,
  .em-home *::after {
    animation: none !important;
    transition: none !important;
  }
}
