:root {
  --eqp-primary: #2563eb;
  --eqp-success: #22c55e;
  --eqp-font: "Tajawal";
  --eqp-warning: #facc15;
  --eqp-violet: #8b5cf6;
  --eqp-text: #0f172a;
  --eqp-muted: #64748b;
  --eqp-bg: #f8fafc;
  --eqp-white: #ffffff;
  --eqp-border: #dbe3ef;
}


.auth-unified-panel {
  max-width: 920px;
  margin-inline: auto;
}

.auth-tabs {
  background: #f8fafc;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 16px;
  gap: .5rem;
  padding: .45rem;
}

.auth-tabs .nav-item {
  flex: 1 1 0;
}

.auth-tabs .nav-link {
  border-radius: 12px;
  color: #0f172a;
  font-weight: 800;
  width: 100%;
}

.auth-tabs .nav-link.active {
  background: linear-gradient(135deg, #2563eb, #22c55e);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .18);
  color: #fff;
}

.auth-form .form-label {
  color: #0f172a;
  font-weight: 700;
}

.auth-form .btn-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.system-grid .system-link-card {
  color: inherit;
  text-decoration: none;
}

.settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.system-form .form-label {
  color: #334155;
  font-size: .9rem;
  font-weight: 700;
}

.system-checklist {
  display: grid;
  gap: .75rem;
}

.system-checklist > div {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: .65rem;
  grid-template-columns: auto 1fr auto;
  padding: .8rem .9rem;
}

.system-subtitle {
  color: #2563eb;
  font-size: 1rem;
  margin: 1rem 0 .5rem;
}

.system-targets {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.system-targets span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-weight: 700;
  padding: .55rem .85rem;
}

.search-result-list a {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: inherit;
  display: block;
  padding: .8rem;
  text-decoration: none;
}

.search-result-list a:hover {
  background: #f8fafc;
  border-color: #93c5fd;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  background: var(--eqp-bg);
  color: var(--eqp-text);
  font-family: var(--eqp-font), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.8;
}

.brand-mark img,
.admin-brand img {
  border-radius: 10px;
  height: 42px;
  object-fit: contain;
  width: 42px;
}

.maintenance-admin-banner {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
  padding: .75rem 1rem;
  text-align: center;
}

.maintenance-page .content-panel {
  border-top: 6px solid var(--eqp-warning);
}

.system-supervision-hero {
  margin-bottom: 1rem;
}

.system-site-card {
  align-items: center;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.system-site-logo {
  align-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(34, 197, 94, .14));
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 18px;
  display: flex;
  height: 96px;
  justify-content: center;
  width: 96px;
}

.system-site-logo img {
  max-height: 72px;
  max-width: 72px;
  object-fit: contain;
}

.system-site-logo i {
  color: var(--eqp-primary);
  font-size: 2.3rem;
}

.system-tabs {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 14px;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .5rem;
}

.system-tabs .nav-link {
  border-radius: 10px;
  color: var(--eqp-text);
  font-weight: 800;
}

.system-tabs .nav-link.active {
  background: var(--eqp-primary);
}

.system-tab-content .admin-panel {
  margin-bottom: 1rem;
}

.system-switch-box {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .9rem 1rem;
}

.system-switch-box span {
  color: var(--eqp-muted);
  display: block;
  font-size: .9rem;
}

.status-pill.is-info {
  background: #e0f2fe;
  color: #075985;
}

.footer-editor-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.footer-editor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-editor-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 14px;
  padding: 1rem;
}

.footer-editor-card-wide {
  grid-column: 1 / -1;
}

.footer-card-title {
  align-items: center;
  border-bottom: 1px solid var(--eqp-border);
  display: flex;
  gap: .65rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
}

.footer-card-title i {
  align-items: center;
  background: rgba(37, 99, 235, .1);
  border-radius: 10px;
  color: var(--eqp-primary);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.footer-card-title h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.footer-link-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: .75rem;
  padding: .75rem;
}

.system-switch-box.compact {
  min-height: 54px;
  padding: .65rem .8rem;
}

a {
  text-decoration: none;
}

.skip-link {
  background: var(--eqp-text);
  color: var(--eqp-white);
  inset-inline-start: 1rem;
  padding: .75rem 1rem;
  position: absolute;
  top: -4rem;
  z-index: 2000;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(219, 227, 239, .8);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.public-compact-navbar .container {
  gap: .75rem;
  flex-wrap: nowrap;
}

.brand-mark {
  color: var(--eqp-text);
  display: grid;
  font-weight: 800;
  line-height: 1.1;
  min-width: 0;
}

.public-compact-navbar .brand-mark {
  align-items: center;
  align-content: center;
  column-gap: .65rem;
  flex: 0 1 255px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-width: 0;
}

.public-compact-navbar .brand-mark img {
  grid-row: 1 / span 2;
}

.public-compact-navbar .brand-mark span {
  align-self: center;
  grid-row: 1 / span 2;
  line-height: 1.25;
}

.public-compact-navbar .brand-mark small {
  display: none;
}

.public-compact-navbar .brand-mark span,
.public-compact-navbar .brand-mark small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark small {
  color: var(--eqp-muted);
  font-size: .78rem;
  font-weight: 600;
}

.public-inline-nav,
.public-header-actions {
  align-items: center;
  display: flex;
  gap: .65rem;
}

.public-inline-nav {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.public-inline-nav a {
  border-radius: 8px;
  color: var(--eqp-text);
  flex: 0 0 auto;
  font-weight: 800;
  padding: .45rem .65rem;
  position: relative;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
  white-space: nowrap;
}

.public-inline-nav a::after {
  background: linear-gradient(90deg, var(--eqp-primary), var(--eqp-success));
  border-radius: 999px;
  bottom: .2rem;
  content: "";
  height: 3px;
  inset-inline: .65rem;
  opacity: 0;
  position: absolute;
  transform: scaleX(.25);
  transform-origin: center;
  transition: opacity .18s ease, transform .18s ease;
}

.public-inline-nav a:hover,
.public-inline-nav a:focus-visible {
  background: rgba(37, 99, 235, .08);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
  color: var(--eqp-primary);
  transform: translateY(-2px);
}

.public-inline-nav a:hover::after,
.public-inline-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.public-inline-nav a:active {
  background: rgba(34, 197, 94, .12);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .1);
  color: var(--eqp-success);
  transform: translateY(0) scale(.97);
}

.app-loading-overlay {
  align-items: center;
  background: rgba(15, 23, 42, .42);
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 3000;
}

.app-loading-overlay:not([hidden]) {
  display: flex;
}

.app-loading-overlay[hidden] {
  display: none;
}

.app-loading-overlay strong {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  color: #0f172a;
  display: inline-flex;
  font-size: 1rem;
  gap: .75rem;
  font-weight: 900;
  justify-content: center;
  min-width: 170px;
  padding: 1rem 1.25rem;
}

.app-loading-spinner {
  animation: app-spin .75s linear infinite;
  border: 3px solid #dbeafe;
  border-top-color: var(--eqp-primary);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 28px;
  width: 28px;
}

@keyframes app-spin {
  to {
    transform: rotate(360deg);
  }
}

.pwa-install-banner {
  align-items: center;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  bottom: 1rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
  color: #fff;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  inset-inline: 1rem;
  padding: .9rem;
  position: fixed;
  z-index: 2500;
}

.pwa-install-banner strong,
.pwa-install-banner span {
  display: block;
}

.pwa-install-banner span {
  color: #cbd5e1;
  font-size: .9rem;
  line-height: 1.7;
}

.public-header-menu .dropdown-item {
  border-radius: 8px;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.public-header-menu .dropdown-item:hover,
.public-header-menu .dropdown-item:focus {
  background: rgba(37, 99, 235, .08);
  color: var(--eqp-primary);
  transform: translateX(-3px);
}

.public-header-menu .dropdown-item:active {
  background: rgba(34, 197, 94, .14);
  color: var(--eqp-success);
  transform: translateX(-1px) scale(.98);
}

.public-header-actions {
  flex: 0 0 auto;
  flex-shrink: 0;
  flex-wrap: nowrap;
  margin-inline-start: auto;
}

.public-header-actions .btn,
.public-menu-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.public-menu-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: var(--eqp-text);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.nav-link {
  color: var(--eqp-text);
  font-weight: 700;
}

.nav-link:focus,
.nav-link:hover {
  color: var(--eqp-primary);
}

.btn {
  border-radius: 8px;
  font-weight: 800;
}

.btn-lg-soft {
  min-height: 44px;
}

.btn-xl {
  font-size: 1.05rem;
  min-height: 54px;
  padding: .85rem 1.35rem;
}

.hero-section {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .13), rgba(34, 197, 94, .1)),
    var(--eqp-bg);
  overflow: hidden;
  padding: 5rem 0 4rem;
}

.home-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(250, 204, 21, .34), transparent 28%),
    linear-gradient(135deg, #eef6ff 0%, #f7f3ff 45%, #ecfdf5 100%);
  border-bottom: 1px solid var(--eqp-border);
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6.5rem) 0 4rem;
}

.home-hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .98fr);
}

.home-hero-copy h1 {
  color: #0b1220;
  font-size: clamp(2.5rem, 6vw, 5.1rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

.home-hero .section-kicker {
  background: rgba(37, 99, 235, .1);
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 999px;
  padding: .25rem .8rem;
}

.home-hero .btn-primary {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border: 0;
  box-shadow: 0 16px 30px rgba(37, 99, 235, .26);
}

.home-hero .btn-light {
  border: 1px solid rgba(15, 23, 42, .12);
  color: var(--eqp-text);
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.hero-trust-row span {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(219, 227, 239, .9);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
  color: #334155;
  font-weight: 800;
  padding: .7rem .9rem;
}

.hero-trust-row strong {
  color: var(--eqp-primary);
  margin-inline-end: .25rem;
}

.home-hero-panel {
  min-height: 430px;
  position: relative;
}

.quiz-preview-card {
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(219, 227, 239, .95);
  border-radius: 16px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, .14);
  margin-inline-start: auto;
  max-width: 520px;
  padding: clamp(1rem, 3vw, 1.6rem);
  position: relative;
  z-index: 2;
}

.preview-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.preview-top span {
  color: var(--eqp-muted);
  font-weight: 800;
}

.preview-top strong {
  color: var(--eqp-primary);
}

.preview-progress {
  background: #dbeafe;
  border-radius: 999px;
  height: 12px;
  margin: 1rem 0 1.25rem;
  overflow: hidden;
}

.preview-progress span {
  background: linear-gradient(90deg, #22c55e, #2563eb);
  display: block;
  height: 100%;
}

.quiz-preview-card h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.preview-answers {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-answers span {
  background: #f8fafc;
  border: 2px solid var(--eqp-border);
  border-radius: 10px;
  font-weight: 800;
  padding: .85rem 1rem;
}

.preview-answers .is-correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}

.hero-floating-note {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
  display: inline-flex;
  font-weight: 800;
  gap: .55rem;
  padding: .85rem 1rem;
  position: absolute;
  z-index: 3;
}

.note-success {
  bottom: 4.2rem;
  inset-inline-start: 0;
}

.note-warning {
  bottom: .7rem;
  inset-inline-end: 1.2rem;
}

.note-success i { color: var(--eqp-success); }
.note-warning i { color: #d97706; }

.home-feature-band {
  background: #fff;
}

.premium-feature-grid .premium-feature-card {
  overflow: hidden;
  position: relative;
}

.premium-feature-card::after {
  border-radius: 50%;
  content: "";
  height: 90px;
  inset-inline-end: -28px;
  opacity: .16;
  position: absolute;
  top: -30px;
  width: 90px;
}

.premium-feature-card.tone-blue::after { background: #2563eb; }
.premium-feature-card.tone-yellow::after { background: #f59e0b; }
.premium-feature-card.tone-green::after { background: #22c55e; }
.premium-feature-card.tone-purple::after { background: #8b5cf6; }
.premium-feature-card.tone-pink::after { background: #ec4899; }
.premium-feature-card.tone-navy::after { background: #0f172a; }

.premium-feature-card.tone-yellow i { background: #fef3c7; color: #b45309; }
.premium-feature-card.tone-green i { background: #dcfce7; color: #15803d; }
.premium-feature-card.tone-purple i { background: #ede9fe; color: #7c3aed; }
.premium-feature-card.tone-pink i { background: #fce7f3; color: #be185d; }
.premium-feature-card.tone-navy i { background: #e2e8f0; color: #0f172a; }

.home-steps-section {
  background: linear-gradient(180deg, #f8fafc, #eef6ff);
}

.premium-steps .step-item {
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.premium-grade-card {
  border-top: 4px solid var(--eqp-primary);
}

.section-kicker {
  color: var(--eqp-primary);
  display: inline-block;
  font-weight: 800;
  margin-bottom: .75rem;
}

.hero-section h1,
.inner-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 1.2rem;
}

.hero-lead,
.inner-hero p {
  color: #334155;
  font-size: 1.22rem;
  max-width: 46rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.8rem;
}

.hero-visual {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 24px;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  padding: 2rem;
  position: relative;
}

.learning-orbit {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.learning-orbit span {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 18px;
  color: #fff;
  display: flex;
  font-size: 2.4rem;
  justify-content: center;
}

.learning-orbit span:nth-child(1) { background: var(--eqp-primary); }
.learning-orbit span:nth-child(2) { background: var(--eqp-success); }
.learning-orbit span:nth-child(3) { background: var(--eqp-warning); color: var(--eqp-text); }
.learning-orbit span:nth-child(4) { background: var(--eqp-violet); }

.mascot-card {
  background: var(--eqp-text);
  border-radius: 16px;
  bottom: 1.25rem;
  color: #fff;
  display: grid;
  gap: .25rem;
  inset-inline-start: 1.25rem;
  max-width: 220px;
  padding: 1rem;
  position: absolute;
}

.page-section {
  padding: 4rem 0;
}

.soft-band {
  background: #fff;
  border-block: 1px solid var(--eqp-border);
}

.section-heading {
  margin-bottom: 2rem;
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
}

.feature-grid,
.grade-grid,
.materials-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.feature-card,
.grade-card,
.material-card,
.content-panel,
.selector-panel,
.not-found-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
  padding: 1.35rem;
}

.feature-card i,
.grade-card i {
  align-items: center;
  background: rgba(37, 99, 235, .1);
  border-radius: 12px;
  color: var(--eqp-primary);
  display: inline-flex;
  font-size: 1.55rem;
  height: 52px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 52px;
}

.feature-card h3,
.grade-card h3,
.material-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.feature-card p,
.material-card p,
.content-panel p {
  color: #475569;
}

.steps {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.step-item {
  align-items: center;
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: flex;
  gap: .85rem;
  padding: 1rem;
}

.step-item span {
  align-items: center;
  background: var(--eqp-warning);
  border-radius: 50%;
  color: var(--eqp-text);
  display: flex;
  flex: 0 0 40px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
}

.step-item p {
  font-weight: 700;
  margin: 0;
}

.grade-card {
  align-items: start;
  display: grid;
  gap: .65rem;
}

.inner-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(139, 92, 246, .1));
  padding: 4rem 0 3.5rem;
}

.selector-panel {
  margin-inline: auto;
  max-width: 920px;
}

.form-label {
  font-weight: 800;
}

.form-control,
.form-select {
  border-color: var(--eqp-border);
  border-radius: 8px;
}

.selector-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.selector-actions p {
  color: var(--eqp-muted);
  margin: 0;
}

.filter-bar {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 1.5rem;
}

.file-badge {
  background: rgba(34, 197, 94, .12);
  border-radius: 999px;
  color: #166534;
  display: inline-block;
  font-weight: 800;
  margin-bottom: .75rem;
  padding: .25rem .75rem;
}

.material-card dl {
  display: grid;
  gap: .4rem;
}

.material-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.material-card dt {
  color: var(--eqp-muted);
}

.material-card dd {
  font-weight: 700;
  margin: 0;
  text-align: end;
}

.material-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.material-actions .btn {
  flex: 1 1 130px;
}

.material-type-pdf .file-badge { background: #fee2e2; color: #991b1b; }
.material-type-doc .file-badge,
.material-type-docx .file-badge { background: #dbeafe; color: #1d4ed8; }
.material-type-ppt .file-badge,
.material-type-pptx .file-badge { background: #ffedd5; color: #c2410c; }
.material-type-png .file-badge,
.material-type-jpg .file-badge,
.material-type-jpeg .file-badge,
.material-type-webp .file-badge { background: #dcfce7; color: #166534; }
.material-type-mp3 .file-badge { background: #ede9fe; color: #6d28d9; }
.material-type-wav .file-badge { background: #ede9fe; color: #6d28d9; }
.material-type-mp4 .file-badge { background: #fce7f3; color: #be185d; }
.material-type-youtube .file-badge { background: #fee2e2; color: #b91c1c; }

.material-preview iframe,
.material-preview video,
.material-preview img {
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: block;
  max-width: 100%;
  width: 100%;
}

.material-preview iframe {
  min-height: 70vh;
}

.material-preview audio {
  width: 100%;
}

.suggested-materials {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  margin-top: 1.25rem;
  padding: 1rem;
  text-align: start;
}

.suggested-materials h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.suggested-materials a {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--eqp-text);
  display: flex;
  gap: .6rem;
  margin-top: .5rem;
  padding: .75rem;
}

.profile-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(34, 197, 94, .1));
  padding: 3rem 0;
}

.profile-card {
  align-items: center;
  display: flex;
  gap: 1.25rem;
}

.profile-avatar {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
  flex: 0 0 86px;
  height: 86px;
  overflow: hidden;
  width: 86px;
}

.profile-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-card h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin: .25rem 0;
}

.profile-card p {
  color: var(--eqp-muted);
  margin: 0 0 .6rem;
}

.profile-badge {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 999px;
  color: var(--eqp-primary);
  display: inline-flex;
  font-weight: 800;
  padding: .3rem .85rem;
}

.profile-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-stat {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: var(--eqp-shadow);
  padding: 1rem;
}

.profile-stat span {
  color: var(--eqp-muted);
  display: block;
  font-weight: 700;
  margin-bottom: .45rem;
}

.profile-stat strong {
  color: var(--eqp-text);
  font-size: 1.55rem;
  font-weight: 800;
}

.profile-children {
  display: grid;
  gap: .75rem;
}

.profile-children article {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: grid;
  gap: .2rem;
  padding: .85rem;
}

.profile-children span,
.profile-children em {
  color: var(--eqp-muted);
  font-style: normal;
}

.narrow-content {
  max-width: 900px;
}

.legal-content h2,
.content-panel h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 1.2rem;
}

.contact-info {
  display: grid;
  gap: .8rem;
}

.contact-info a {
  color: var(--eqp-text);
  font-weight: 700;
}

.contact-info i {
  color: var(--eqp-primary);
  margin-inline-end: .5rem;
}

.not-found-page {
  padding: 5rem 0;
}

.not-found-card {
  margin-inline: auto;
  max-width: 680px;
  text-align: center;
}

.not-found-card i {
  color: var(--eqp-warning);
  font-size: 4rem;
  margin-bottom: 1rem;
}

.site-footer {
  background: #0f172a;
  color: #dbeafe;
  padding: 3rem 0 1.5rem;
}

.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.site-footer a {
  color: #dbeafe;
  display: block;
  margin: .35rem 0;
}

.footer-credit-line .footer-zaran-link {
  color: #fff;
  display: inline;
  font-weight: 800;
  margin: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-credit-line .footer-zaran-link:hover,
.footer-credit-line .footer-zaran-link:focus-visible {
  color: #93c5fd;
}

.footer-brand {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .15);
  margin-top: 2rem;
  padding-top: 1rem;
}

.whatsapp-float {
  align-items: center;
  background: #22c55e;
  border-radius: 50%;
  bottom: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .25);
  color: #fff;
  display: flex;
  font-size: 1.6rem;
  height: 56px;
  inset-inline-start: 1rem;
  justify-content: center;
  position: fixed;
  width: 56px;
  z-index: 1000;
}

.quiz-shell {
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
  min-height: 70vh;
  padding: 2rem 0 4rem;
}

.quiz-topbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.quiz-topbar h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0;
}

.timer-box {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: var(--eqp-primary);
  display: flex;
  font-size: 1.25rem;
  font-weight: 800;
  gap: .5rem;
  min-width: 116px;
  padding: .7rem 1rem;
}

.timer-box.is-ending {
  color: #b91c1c;
}

.quiz-progress {
  background: #dbeafe;
  height: 1.1rem;
  margin-bottom: 1.25rem;
}

.quiz-progress .progress-bar {
  background: var(--eqp-success);
  color: var(--eqp-text);
  font-weight: 800;
}

.question-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
  padding: clamp(1rem, 3vw, 2rem);
}

.question-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  justify-content: space-between;
}

.question-heading > span {
  color: var(--eqp-muted);
  font-weight: 800;
}

.question-report-toggle {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 800;
  gap: .45rem;
  justify-content: center;
  min-height: 40px;
  padding: .4rem .8rem;
}

.question-report-toggle:hover,
.question-report-toggle:focus-visible {
  background: #ffedd5;
  border-color: #fb923c;
  color: #7c2d12;
  outline: 3px solid rgba(249, 115, 22, .2);
}

.question-report-panel {
  background: #fffaf5;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  display: grid;
  gap: .65rem;
  margin-top: .75rem;
  max-width: 420px;
  padding: 1rem;
}

.question-report-panel[hidden] {
  display: none;
}

.question-report-panel label {
  color: #7c2d12;
  font-weight: 800;
}

.question-report-panel textarea {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: #1e293b;
  padding: .65rem;
  resize: vertical;
  width: 100%;
}

.question-report-panel > div {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.question-report-panel p {
  color: #475569;
  margin: 0;
}

.question-report-panel.is-sent p {
  color: #166534;
  font-weight: 800;
}

.theme-dark .quiz-shell {
  --eqp-text: #0f172a;
  --eqp-muted: #64748b;
  --eqp-border: #dbe3ef;
  color: #0f172a;
}

.theme-dark .quiz-shell .section-kicker {
  color: #1d4ed8;
}

.theme-dark .quiz-shell .question-report-panel textarea,
.theme-dark .quiz-shell .question-report-panel textarea:focus {
  background-color: #fff;
  border-color: #dbe3ef;
  box-shadow: none;
  color: #1e293b;
}

.theme-dark .quiz-shell .question-report-panel textarea::placeholder {
  color: #64748b;
}

.question-text h2 {
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  font-weight: 800;
  line-height: 1.45;
  margin: .35rem 0 1rem;
}

.question-media {
  aspect-ratio: 16 / 9;
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 12px;
  display: block;
  margin: 1rem auto;
  max-width: 100%;
  min-height: 220px;
  object-fit: contain;
  padding: .75rem;
  width: min(100%, 560px);
}

.question-audio {
  margin: .5rem 0 1rem;
  width: 100%;
}

.answers-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.answer-option {
  align-items: center;
  background: #fff;
  border: 2px solid var(--eqp-border);
  border-radius: 10px;
  color: var(--eqp-text);
  display: flex;
  gap: .85rem;
  min-height: 76px;
  padding: 1rem;
  text-align: start;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.answer-option:focus,
.answer-option:hover {
  border-color: var(--eqp-primary);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.answer-option.is-selected {
  transform: scale(1.015);
}

.answer-option.is-correct {
  background: #dcfce7;
  border-color: #16a34a;
}

.answer-option.is-wrong {
  background: #fee2e2;
  border-color: #dc2626;
}

.answer-marker {
  align-items: center;
  border-radius: 50%;
  display: flex;
  flex: 0 0 42px;
  font-size: 1.35rem;
  height: 42px;
  justify-content: center;
}

.answer-content strong {
  display: block;
  font-size: 1.15rem;
}

.interactive-answer-box {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 12px;
  margin-top: 1.25rem;
  padding: clamp(1rem, 3vw, 1.35rem);
}

.dictation-listen-box {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  display: grid;
  gap: .8rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1rem;
  padding: 1rem;
}

.dictation-listen-box .btn {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  font-weight: 900;
  gap: .55rem;
  justify-content: center;
  min-height: 58px;
  padding: .85rem 1.25rem;
}

.dictation-listen-box .btn-primary {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border: 0;
  box-shadow: 0 8px 0 rgba(37, 99, 235, .2);
}

.dictation-listen-box .btn-outline-primary {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.dictation-voice-select {
  display: none !important;
}

.dictation-voice-badge {
  display: none !important;
}

.dictation-listen-box small {
  color: #475569;
  font-weight: 800;
  grid-column: 1 / -1;
}

.dictation-hint {
  background: #fef3c7;
  border-radius: 10px;
  color: #92400e !important;
  padding: .55rem .75rem;
}

.dictation-sentence-box {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #93c5fd;
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  font-weight: 900;
  gap: .45rem;
  grid-column: 1 / -1;
  justify-content: center;
  padding: .8rem;
}

.dictation-blank-preview {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 999px;
  min-width: 72px;
  padding: .2rem .8rem;
  text-align: center;
}

.interactive-answer-box > .form-label {
  color: #0f172a;
  display: block;
  font-size: 1.12rem;
  font-weight: 900;
  margin: 1rem 0 .45rem;
}

.interactive-answer-box input[data-interactive-response] {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 900;
  min-height: 64px;
  padding: .85rem 1rem;
}

.interactive-answer-box input[data-interactive-response]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

.interactive-group-title {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  display: grid;
  gap: .2rem .75rem;
  grid-template-columns: 46px minmax(0, 1fr);
  margin-bottom: 1rem;
  padding: .85rem 1rem;
}

.interactive-group-title i {
  align-items: center;
  background: #e0f2fe;
  border-radius: 12px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 1.25rem;
  grid-row: 1 / span 2;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.interactive-group-title span {
  color: #0f172a;
  font-size: 1.06rem;
  font-weight: 900;
}

.interactive-group-title small {
  color: #64748b;
  font-weight: 800;
}

.interactive-bank,
.interactive-dropzone {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: 1rem;
}

.interactive-bank {
  justify-content: center;
}

.interactive-bank button,
.interactive-dropzone button {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  box-shadow: 0 6px 0 rgba(37, 99, 235, .18);
  color: #0f172a;
  cursor: pointer;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 900;
  line-height: 1.35;
  min-height: 54px;
  padding: .7rem 1rem;
  transition: transform .08s ease, box-shadow .08s ease, border-color .16s ease, background .16s ease;
}

.interactive-bank button:hover,
.interactive-bank button:focus,
.interactive-dropzone button:hover,
.interactive-dropzone button:focus {
  background: #eff6ff;
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, .16);
  transform: translateY(-1px);
}

.interactive-bank button:active,
.interactive-dropzone button:active {
  box-shadow: 0 3px 0 rgba(37, 99, 235, .22);
  transform: translateY(3px) scale(.98);
}

.interactive-bank button[hidden] {
  display: none !important;
}

.interactive-dropzone {
  align-items: center;
  background: #ffffff;
  border: 2px dashed #93c5fd;
  border-radius: 16px;
  color: #64748b;
  justify-content: center;
  min-height: 86px;
  padding: 1rem;
  text-align: center;
}

.interactive-dropzone:not(:empty) {
  color: #0f172a;
}

.interactive-answer-box .btn,
[data-token-reset] {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  gap: .55rem;
  justify-content: center;
  min-height: 50px;
}

[data-token-reset] {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  margin-inline-end: .5rem;
}

.matching-board {
  display: grid;
  gap: 1rem;
  grid-template-areas:
    "hint hint"
    "prompts answers"
    "feedback feedback"
    "reset reset";
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.matching-game-hint {
  grid-area: hint;
  text-align: center;
}

.matching-game-hint span {
  align-items: center;
  background: #fff7ed;
  border: 2px dashed #f59e0b;
  border-radius: 999px;
  color: #92400e;
  display: inline-flex;
  font-weight: 900;
  gap: .45rem;
  padding: .55rem 1rem;
}

.matching-column {
  background: #ffffff;
  border: 1px solid var(--eqp-border);
  border-radius: 18px;
  display: grid;
  gap: .85rem;
  padding: .85rem;
}

.matching-column-right {
  grid-area: prompts;
}

.matching-column-left {
  grid-area: answers;
}

.matching-column > strong {
  align-items: center;
  color: #0f172a;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  gap: .45rem;
  justify-content: center;
}

.matching-column > strong i {
  color: #2563eb;
}

.matching-card {
  background: #f8fafc;
  border: 3px solid #bfdbfe;
  border-radius: 18px;
  box-shadow: 0 5px 0 #93c5fd;
  color: #0f172a;
  display: grid;
  gap: .35rem;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 900;
  line-height: 1.35;
  min-height: 78px;
  padding: .9rem .75rem;
  place-items: center;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
  width: 100%;
}

.matching-card-main {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
  justify-content: center;
}

.matching-card:hover,
.matching-card:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14), 0 5px 0 #93c5fd;
  outline: none;
  transform: translateY(-1px);
}

.matching-prompt.is-active,
.matching-answer.is-active {
  background: #fffbeb;
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .2), 0 5px 0 #d97706;
}

.matching-card.is-matched,
.matching-prompt.is-matched,
.matching-answer.is-used {
  background: color-mix(in srgb, var(--matching-pair-color, #22c55e) 13%, #ffffff);
  border-color: var(--matching-pair-color, #22c55e);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--matching-pair-color, #22c55e) 72%, #0f172a);
}

.matching-answer.is-used {
  opacity: .86;
}

.matching-card.is-matched::after {
  color: var(--matching-pair-color, #22c55e);
  content: "✓";
  font-size: 1.2rem;
  font-weight: 900;
}

.matching-card small {
  color: #64748b;
  font-size: .86rem;
  font-weight: 800;
}

.matching-feedback {
  align-items: center;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-weight: 900;
  gap: .45rem;
  grid-area: feedback;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1rem;
  text-align: center;
}

.matching-feedback.is-success {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.matching-reset-btn {
  grid-area: reset;
  justify-self: center;
}

@media (max-width: 767.98px) {
  .dictation-listen-box {
    grid-template-columns: 1fr;
    padding: .85rem;
  }

  .dictation-listen-box .btn,
  .dictation-listen-box .btn-outline-primary {
    width: 100%;
  }

  .matching-board {
    gap: .65rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .matching-column {
    border-radius: 14px;
    gap: .55rem;
    padding: .55rem;
  }

  .matching-column > strong {
    font-size: .84rem;
  }

  .matching-card {
    border-radius: 14px;
    border-width: 2px;
    box-shadow: 0 3px 0 #93c5fd;
    font-size: clamp(.88rem, 4vw, 1.06rem);
    min-height: 58px;
    padding: .65rem .35rem;
  }

  .matching-card small {
    font-size: .68rem;
    line-height: 1.25;
  }

  .matching-game-hint span,
  .matching-feedback {
    border-radius: 16px;
    font-size: .82rem;
    padding: .55rem .65rem;
  }
}

.feedback-box {
  border-radius: 10px;
  margin-top: 1.25rem;
  padding: 1rem;
}

.feedback-box.is-correct {
  background: #dcfce7;
  border: 1px solid #16a34a;
}

.feedback-box.is-wrong {
  background: #fff7ed;
  border: 1px solid #f97316;
}

.feedback-box strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: .35rem;
}

.quiz-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.finish-form {
  margin: 0;
}

.result-hero {
  background: linear-gradient(135deg, rgba(34, 197, 94, .16), rgba(37, 99, 235, .12));
  padding: 4rem 0;
}

.result-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 14px;
  box-shadow: 0 20px 46px rgba(15, 23, 42, .09);
  margin-inline: auto;
  max-width: 920px;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  text-align: center;
}

.result-card h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
}

.result-score {
  color: var(--eqp-primary);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  line-height: 1;
  margin: 1rem 0;
}

.result-stats {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 1.5rem 0;
}

.result-stats div {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  padding: 1rem;
}

.result-stats strong,
.result-stats span {
  display: block;
}

.result-stats strong {
  font-size: 1.35rem;
  font-weight: 800;
}

.review-list {
  display: grid;
  gap: 1rem;
}

.review-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-inline-start: 6px solid var(--eqp-success);
  border-radius: 8px;
  padding: 1.25rem;
}

.review-card.is-wrong {
  border-inline-start-color: #ef4444;
}

.review-status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: space-between;
}

.review-status span {
  color: var(--eqp-muted);
  font-weight: 800;
}

.review-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: .75rem 0;
}

.review-card dl {
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.review-card dl div,
.review-explanation {
  background: var(--eqp-bg);
  border-radius: 8px;
  padding: .9rem;
}

.review-card dt {
  color: var(--eqp-muted);
  font-weight: 800;
}

.review-card dd {
  font-weight: 800;
  margin: 0;
}

.admin-body {
  background: #eef3f8;
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns .2s ease;
  width: 100%;
}

.admin-shell.is-sidebar-collapsed {
  grid-template-columns: 86px minmax(0, 1fr);
}

.admin-sidebar {
  background: #0f172a;
  color: #fff;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem;
  position: sticky;
  scrollbar-color: rgba(255, 255, 255, .35) transparent;
  scrollbar-width: thin;
  top: 0;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar {
  padding-inline: .7rem;
}

.admin-sidebar::-webkit-scrollbar {
  width: 8px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .28);
  border-radius: 999px;
}

.admin-brand {
  color: #fff;
  display: grid;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  padding: .75rem;
}

.admin-shell.is-sidebar-collapsed .admin-brand {
  justify-items: center;
  margin-bottom: 1rem;
  padding-inline: .35rem;
}

.admin-shell.is-sidebar-collapsed .admin-brand span,
.admin-shell.is-sidebar-collapsed .admin-brand small {
  display: none;
}

.admin-brand small {
  color: #bfdbfe;
  font-size: .78rem;
}

.admin-sidebar nav {
  display: grid;
  gap: .35rem;
}

.admin-sidebar nav a {
  align-items: center;
  border-radius: 8px;
  color: #dbeafe;
  display: flex;
  gap: .75rem;
  min-height: 42px;
  padding: .65rem .75rem;
  text-decoration: none;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar nav a {
  gap: 0;
  justify-content: center;
  padding-inline: .35rem;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar nav a span {
  display: none;
}

.admin-sidebar nav a span {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-sidebar nav a:focus,
.admin-sidebar nav a:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.admin-main {
  min-width: 0;
  width: 100%;
}

.admin-topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--eqp-border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 900;
}

.admin-topbar-title {
  align-items: center;
  display: flex;
  gap: .85rem;
  min-width: 0;
}

.admin-topbar-title > div {
  min-width: 0;
}

.admin-sidebar-toggle {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: var(--eqp-primary);
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
  width: 44px;
}

.admin-sidebar-toggle:hover,
.admin-sidebar-toggle:focus {
  background: var(--eqp-primary);
  border-color: var(--eqp-primary);
  color: #fff;
  outline: none;
}

.admin-sidebar-toggle:active {
  transform: translateY(1px) scale(.98);
}

.admin-shell.is-sidebar-collapsed .admin-sidebar-toggle i {
  transform: rotate(180deg);
}

.admin-topbar strong,
.admin-topbar span {
  display: block;
}

.admin-topbar span {
  color: var(--eqp-muted);
  font-size: .95rem;
}

.admin-actions,
.table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.table-actions form {
  margin: 0;
}

.admin-content {
  padding: 1.5rem;
  min-width: 0;
  overflow-x: hidden;
}

.admin-page-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-page-heading h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0;
}

.admin-page-heading p {
  color: var(--eqp-muted);
  margin: .25rem 0 0;
}

.admin-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1rem;
}

.admin-stat-card,
.admin-panel {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}

.admin-stat-card {
  display: grid;
  gap: .35rem;
  padding: 1rem;
}

.admin-stat-card i {
  color: var(--eqp-primary);
  font-size: 1.4rem;
}

.admin-stat-card span {
  color: var(--eqp-muted);
  font-weight: 700;
}

.admin-stat-card strong {
  font-size: 2rem;
  font-weight: 800;
}

.admin-grid-two {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
}

.admin-panel {
  margin-bottom: 1rem;
  padding: 1rem;
}

.admin-panel h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.activity-list {
  display: grid;
  gap: .6rem;
}

.activity-list div {
  background: var(--eqp-bg);
  border-radius: 8px;
  padding: .75rem;
}

.activity-list strong,
.activity-list span {
  display: block;
}

.activity-list span {
  color: var(--eqp-muted);
  font-size: .9rem;
}

.admin-filter-bar {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 1rem;
  padding: 1rem;
}

.question-filters {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.admin-table {
  min-width: 820px;
  vertical-align: middle;
}

.admin-table th {
  color: var(--eqp-muted);
  font-size: .9rem;
  white-space: nowrap;
}

.profile-table td {
  vertical-align: top;
}

.profile-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  max-width: 520px;
}

.profile-chip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 999px;
  display: inline-flex;
  gap: .35rem;
  max-width: 100%;
  padding: .28rem .65rem;
}

.profile-chip strong {
  color: var(--eqp-muted);
  font-size: .78rem;
  white-space: nowrap;
}

.profile-chip em {
  color: var(--eqp-text);
  font-style: normal;
  font-weight: 800;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-details {
  margin-top: .45rem;
}

.profile-details summary {
  color: var(--eqp-primary);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 800;
}

.profile-details dl {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: grid;
  gap: .45rem;
  margin: .5rem 0 0;
  padding: .65rem;
}

.profile-details dl div {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.profile-details dt {
  color: var(--eqp-muted);
  font-size: .86rem;
}

.profile-details dd {
  font-weight: 800;
  margin: 0;
  text-align: end;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: .85rem;
  font-weight: 800;
  padding: .2rem .65rem;
}

.status-pill.is-active {
  background: #dcfce7;
  color: #166534;
}

.status-pill.is-muted {
  background: #e2e8f0;
  color: #475569;
}

.admin-form h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.answers-editor {
  display: grid;
  gap: .75rem;
}

.answer-edit-row {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .4rem;
}

.tag-row span {
  background: #eff6ff;
  border-radius: 999px;
  color: var(--eqp-primary);
  font-size: .82rem;
  font-weight: 800;
  padding: .15rem .55rem;
}

.risk-note {
  color: #b91c1c;
  display: block;
  font-weight: 800;
}

.import-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.admin-preview-card {
  max-width: 920px;
}

.permission-grid {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.permission-grid label {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  font-weight: 700;
  padding: .6rem .75rem;
}

.role-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.role-list article {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  padding: 1rem;
}

.role-list h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.report-filter-bar {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.report-kpi {
  border-top: 4px solid var(--eqp-primary);
}

.report-kpi.is-success {
  border-top-color: var(--eqp-success);
}

.report-kpi.is-warning {
  border-top-color: var(--eqp-warning);
}

.report-kpi.is-violet {
  border-top-color: var(--eqp-violet);
}

.report-chart {
  min-height: 290px;
}

.report-alerts {
  display: grid;
  gap: .75rem;
  margin-bottom: 1rem;
}

.report-alert {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-inline-start: 5px solid var(--eqp-primary);
  border-radius: 8px;
  display: flex;
  font-weight: 800;
  gap: .7rem;
  padding: .85rem 1rem;
}

.report-alert.is-danger {
  border-inline-start-color: #ef4444;
  color: #991b1b;
}

.report-alert.is-warning {
  border-inline-start-color: #f59e0b;
  color: #92400e;
}

.report-alert.is-info {
  border-inline-start-color: #2563eb;
  color: #1d4ed8;
}

.report-alert.is-muted {
  border-inline-start-color: #64748b;
  color: #475569;
}

.status-pill.is-danger {
  background: #fee2e2;
  color: #991b1b;
}

.communication-stat {
  border-top: 4px solid var(--eqp-violet);
}

.role-dashboard-grid,
.help-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.role-dashboard-grid section {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  padding: 1rem;
}

.role-dashboard-grid h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.mini-metric,
.setting-toggle,
.engagement-summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: flex;
  gap: .7rem;
  justify-content: space-between;
  margin-top: .5rem;
  padding: .7rem;
}

.notification-list,
.comment-list {
  display: grid;
  gap: .8rem;
}

.notification-item {
  align-items: center;
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 1rem;
}

.notification-item.is-unread {
  border-inline-start: 5px solid var(--eqp-primary);
}

.notification-item.is-question-report {
  background: #fff7ed;
  border-color: #fed7aa;
}

.notification-item.is-question-report > i {
  color: #ea580c;
}

.notification-item h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

.question-report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .75rem 0 .35rem;
}

.question-report-summary span {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #431407;
  font-size: .9rem;
  line-height: 1.7;
  padding: .35rem .65rem;
}

.admin-article-title-cell {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: 88px minmax(0, 1fr);
  max-width: 520px;
  min-width: 0;
}

.admin-article-title-cell img,
.article-image-preview img {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  display: block;
  object-fit: cover;
}

.admin-article-title-cell img {
  border-radius: 8px;
  height: 64px;
  max-width: 88px;
  width: 88px;
}

.admin-article-title-cell strong,
.admin-article-title-cell small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-article-title-cell small {
  color: var(--eqp-muted);
  font-size: .86rem;
  line-height: 1.6;
  margin-top: .25rem;
}

.article-image-preview {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed var(--eqp-border);
  border-radius: 8px;
  display: flex;
  gap: .75rem;
  min-width: 0;
  padding: .65rem;
}

.article-image-preview img {
  border-radius: 8px;
  height: 76px;
  max-width: 112px;
  width: 112px;
}

.article-image-preview span {
  color: var(--eqp-muted);
  font-size: .9rem;
  font-weight: 800;
}

.magazine-article-hero {
  background: #f8fafc;
  border-bottom: 1px solid var(--eqp-border);
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.magazine-article-hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
}

.magazine-cover-card {
  aspect-ratio: 16 / 10;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
  max-height: 340px;
  overflow: hidden;
  width: 100%;
}

.magazine-cover-card img,
.article-clean-card img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.magazine-cover-placeholder,
.article-list-placeholder {
  align-items: center;
  background: #eff6ff;
  color: var(--eqp-primary);
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.magazine-cover-placeholder {
  flex-direction: column;
  gap: .5rem;
}

.magazine-cover-placeholder i {
  font-size: 2.4rem;
}

.magazine-layout {
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.magazine-reader,
.magazine-sidebar-card,
.article-clean-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .05);
}

.magazine-reader {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.magazine-reader-body {
  color: #334155;
  font-size: 1.05rem;
  line-height: 2;
  overflow-wrap: anywhere;
}

.magazine-reader-body img {
  border-radius: 8px;
  display: block;
  height: auto;
  margin: 1rem auto;
  max-height: 520px;
  max-width: 100%;
  object-fit: contain;
}

.magazine-sidebar {
  display: grid;
  gap: 1rem;
}

.magazine-sidebar-card {
  padding: 1rem;
}

.articles-magazine-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.article-clean-card {
  overflow: hidden;
}

.article-clean-card > a {
  color: inherit;
  display: grid;
  gap: .85rem;
  height: 100%;
  text-decoration: none;
}

.article-clean-card img,
.article-list-placeholder {
  aspect-ratio: 16 / 9;
  max-height: 220px;
}

.article-clean-head,
.article-list-content {
  display: grid;
  gap: .45rem;
  padding-inline: 1rem;
}

.article-clean-head {
  padding-top: 1rem;
}

.article-list-content {
  padding-bottom: 1rem;
}

@media (max-width: 991.98px) {
  .magazine-article-hero-grid,
  .magazine-layout {
    grid-template-columns: 1fr;
  }

  .magazine-cover-card {
    max-height: 280px;
  }
}

@media (max-width: 575.98px) {
  .pwa-install-banner {
    grid-template-columns: 1fr;
  }

  .pwa-install-banner .btn {
    width: 100%;
  }

  .admin-article-title-cell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .admin-article-title-cell img {
    height: 54px;
    max-width: 72px;
    width: 72px;
  }
}

.messages-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
}

.thread-list {
  display: grid;
  gap: .6rem;
  align-content: start;
}

.thread-item {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: var(--eqp-text);
  display: grid;
  gap: .25rem;
  padding: .85rem;
}

.thread-item.is-active {
  border-color: var(--eqp-primary);
  box-shadow: inset 4px 0 0 var(--eqp-primary);
}

.message-stream {
  display: grid;
  gap: .75rem;
  max-height: 520px;
  overflow: auto;
}

.message-bubble,
.comment-card,
.reply-card,
.faq-item {
  background: var(--eqp-bg);
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  padding: .9rem;
}

.message-bubble p,
.comment-card p,
.reply-card p {
  margin-bottom: .35rem;
}

.reply-card {
  background: #fff;
  margin-top: .6rem;
  margin-inline-start: 1rem;
}

.notification-settings {
  display: grid;
  gap: .65rem;
  max-width: 780px;
}

.rating-form {
  display: flex;
  gap: .5rem;
}

.material-engagement,
.comments-section {
  margin-top: 1rem;
}

.help-card iframe {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  width: 100%;
}

.lms-role-grid,
.assignment-grid,
.calendar-grid,
.badge-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.lms-metric-list {
  display: grid;
  gap: .5rem;
}

.assignment-card,
.calendar-event,
.student-badge {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
  padding: 1rem;
}

.assignment-card h2,
.calendar-event h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: .6rem;
}

.assignment-card dl {
  display: grid;
  gap: .35rem;
}

.assignment-card dl div {
  display: flex;
  justify-content: space-between;
}

.assignment-card dt {
  color: var(--eqp-muted);
  font-weight: 800;
}

.assignment-card dd {
  margin: 0;
  font-weight: 800;
}

.submission-review-form {
  display: grid;
  gap: .4rem;
  min-width: 260px;
}

.calendar-event {
  border-top: 5px solid var(--eqp-primary);
}

.event-assignment { border-top-color: var(--eqp-success); }
.event-quiz { border-top-color: var(--eqp-primary); }
.event-announcement { border-top-color: var(--eqp-violet); }
.event-holiday { border-top-color: var(--eqp-warning); }

.calendar-event span {
  color: var(--eqp-muted);
  font-weight: 800;
}

.student-badge {
  align-items: center;
  display: grid;
  gap: .35rem;
  text-align: center;
}

.student-badge i {
  color: var(--eqp-warning);
  font-size: 2rem;
}

.ai-answer h3,
.ai-answer h4 {
  font-weight: 800;
}

.leaderboard-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.leaderboard-carousel {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  margin-inline: auto;
  max-width: 760px;
}

.grade-leaderboard-stack {
  min-height: 250px;
  position: relative;
}

.grade-leaderboard {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
  inset: 0;
  opacity: 0;
  padding: 1.25rem;
  pointer-events: none;
  position: absolute;
  text-align: center;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  visibility: hidden;
}

.grade-leaderboard.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.leaderboard-nav {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
  color: var(--eqp-primary);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.grade-leaderboard h3 {
  color: var(--eqp-primary);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 auto 1rem;
}

.top-student-circles {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  justify-items: center;
}

.top-student-circle {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  max-width: 160px;
  position: relative;
  text-align: center;
}

.top-student-circle img {
  aspect-ratio: 1;
  background: #eef2ff;
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 18px 38px rgba(37, 99, 235, .16);
  height: 108px;
  object-fit: cover;
  width: 108px;
}

.top-student-circle strong {
  color: var(--eqp-text);
  font-weight: 800;
  line-height: 1.3;
}

.top-rank {
  align-items: center;
  background: #facc15;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(202, 138, 4, .18);
  color: #713f12;
  display: inline-flex;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: -3px;
  width: 32px;
}

.avatar-upload-button {
  align-items: center;
  background: var(--eqp-primary);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: .45rem;
  justify-content: center;
  min-height: 46px;
  padding: .65rem 1rem;
}

.avatar-upload-button:hover {
  background: #1d4ed8;
}

.avatar-upload-button-sm {
  min-height: 40px;
  width: 100%;
}

.parent-child-editors {
  display: grid;
  gap: .8rem;
}

.child-editor {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .75rem;
}

.child-editor summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: .8rem;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  list-style: none;
}

.child-editor summary::-webkit-details-marker {
  display: none;
}

.child-editor summary img {
  aspect-ratio: 1;
  background: #e0f2fe;
  border-radius: 50%;
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.child-editor summary span {
  display: grid;
  gap: .15rem;
  text-align: start;
}

.child-editor summary strong {
  font-weight: 800;
}

.child-editor summary small {
  color: var(--eqp-muted);
  font-weight: 700;
}

.child-editor form {
  border-top: 1px solid #e2e8f0;
  margin-top: .8rem;
  padding-top: .9rem;
}

.child-report-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 1rem;
}

.child-report-grid article {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: .85rem;
}

.child-report-grid span {
  color: var(--eqp-muted);
  display: block;
  font-size: .9rem;
  font-weight: 800;
  margin-bottom: .25rem;
}

.child-report-grid strong {
  color: var(--eqp-primary);
  font-size: 1.25rem;
  font-weight: 900;
}

.child-report-note {
  align-items: flex-start;
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #713f12;
  display: flex;
  font-weight: 800;
  gap: .6rem;
  margin-top: .85rem;
  padding: .8rem;
}

.child-meta-list {
  color: var(--eqp-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .85rem;
}

.child-meta-list span {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 800;
  padding: .35rem .7rem;
}

.upload-status {
  color: var(--eqp-muted);
  display: block;
  font-size: .88rem;
  font-weight: 700;
  margin-top: .45rem;
}

.upload-status.is-ready {
  color: #15803d;
}

.child-editor-actions {
  align-items: center;
  display: flex;
  gap: .6rem;
  justify-content: flex-start;
}

.child-delete-form {
  border-top: 0;
  margin-top: .4rem;
  padding-top: 0;
}

.math-toolbar {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  justify-content: space-between;
  padding: .85rem;
}

.math-toolbar strong {
  color: #1d4ed8;
  display: block;
  font-weight: 900;
}

.math-toolbar small {
  color: var(--eqp-muted);
  display: block;
  font-weight: 700;
  margin-top: .15rem;
}

.math-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.math-toolbar-actions button {
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #0f172a;
  font-weight: 900;
  min-height: 38px;
  min-width: 44px;
  padding: .35rem .7rem;
}

.math-toolbar-actions button:hover,
.math-toolbar-actions button:focus {
  background: #2563eb;
  color: #fff;
}

.math-fraction {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  font-weight: 900;
  line-height: 1;
  margin: 0 .12em;
  min-width: 1.35em;
  vertical-align: middle;
}

.math-fraction span:first-child {
  border-bottom: 2px solid currentColor;
  display: block;
  padding: 0 .25em .12em;
  text-align: center;
  width: 100%;
}

.math-fraction span:last-child {
  display: block;
  padding-top: .12em;
  text-align: center;
  width: 100%;
}

.math-mixed {
  align-items: center;
  direction: ltr;
  display: inline-flex;
  gap: .18em;
  vertical-align: middle;
}

.math-mixed > span {
  direction: rtl;
}

.math-root {
  border-top: 2px solid currentColor;
  display: inline-flex;
  gap: .08em;
  margin-inline-start: .15em;
  padding-inline-start: .2em;
  vertical-align: middle;
}

.admin-child-list {
  display: grid;
  gap: .55rem;
  margin-top: .65rem;
}

.admin-child-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: .65rem;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: .55rem;
}

.admin-child-card img {
  aspect-ratio: 1;
  border-radius: 50%;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.admin-child-card span {
  display: grid;
  gap: .1rem;
}

.admin-child-card strong {
  font-weight: 800;
}

.admin-child-card small,
.admin-child-card em {
  color: var(--eqp-muted);
  font-style: normal;
}

.admin-user-children {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .45rem;
}

.admin-user-children span {
  color: var(--eqp-muted);
  font-weight: 800;
}

.admin-user-children em {
  background: #eef2ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-style: normal;
  font-weight: 800;
  padding: .15rem .5rem;
}

.register-role-switch {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.register-role-switch label,
.captcha-box {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  gap: .65rem;
  padding: .85rem;
}

.register-role-switch label {
  cursor: pointer;
  font-weight: 800;
}

.captcha-box {
  justify-content: space-between;
}

.captcha-box strong {
  color: var(--eqp-primary);
  font-size: 1.2rem;
  white-space: nowrap;
}

.auth-page .content-panel {
  margin-inline: auto;
  max-width: 620px;
}

@media (max-width: 1199.98px) and (min-width: 768px) {
  .admin-shell {
    grid-template-columns: 235px minmax(0, 1fr);
  }

  .admin-sidebar {
    padding: .75rem;
  }

  .admin-brand {
    font-size: 1.05rem;
    margin-bottom: .9rem;
    padding: .6rem;
  }

  .admin-sidebar nav a {
    gap: .55rem;
    padding: .55rem .6rem;
  }

  .admin-sidebar nav a span {
    font-size: .92rem;
  }

  .admin-content {
    padding: 1rem;
  }
}

@media (prefers-color-scheme: dark) {
  .admin-body.is-dark-ready {
    background: #0f172a;
    color: #e2e8f0;
  }
}

@media (max-width: 1199.98px) {
  .public-inline-nav {
    display: none;
  }

  .public-compact-navbar .brand-mark {
    flex: 1 1 auto;
  }
}

@media (max-width: 767.98px) {
  body {
    font-size: 16px;
  }

  .public-compact-navbar .container {
    flex-wrap: nowrap;
  }

  .public-compact-navbar .brand-mark {
    flex: 1 1 auto;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .public-compact-navbar .brand-mark img {
    height: 38px;
    width: 38px;
  }

  .public-compact-navbar .brand-mark span {
    font-size: .95rem;
    max-width: 42vw;
  }

  .public-compact-navbar .brand-mark small,
  .public-inline-nav,
  .public-worksheet-button {
    display: none;
  }

  .public-header-actions {
    gap: .45rem;
  }

  .public-start-button {
    min-height: 42px;
    padding-inline: .8rem;
  }

  .public-start-button span {
    font-size: .9rem;
    white-space: nowrap;
  }

  .hero-section,
  .inner-hero {
    padding: 3rem 0;
  }

  .home-hero {
    padding: 3rem 0;
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-panel {
    min-height: 360px;
  }

  .hero-floating-note {
    position: static;
    margin-top: .75rem;
  }

  .hero-visual {
    min-height: 290px;
  }

  .selector-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .selector-actions .btn {
    width: 100%;
  }

  .quiz-topbar,
  .quiz-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .timer-box,
  .quiz-actions .btn,
  .finish-form,
  .finish-form .btn {
    width: 100%;
  }

  .answers-grid {
    grid-template-columns: 1fr;
  }

  .question-report-panel {
    max-width: 100%;
  }

  .question-media {
    min-height: 170px;
    padding: .5rem;
    width: 100%;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    height: auto;
    position: static;
  }

  .admin-shell.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar {
    padding: .75rem;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand {
    display: none;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar nav {
    display: none;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-topbar,
  .admin-page-heading,
  .answer-edit-row {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .admin-topbar-title {
    align-items: flex-start;
    width: 100%;
  }

  .admin-grid-two {
    grid-template-columns: 1fr;
  }

  .messages-layout,
  .notification-item {
    grid-template-columns: 1fr;
  }

  .footer-editor-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-editor-grid {
    grid-template-columns: 1fr;
  }

  .top-student-circles {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
  }

  .top-student-circle img {
    height: 82px;
    width: 82px;
  }

  .top-student-circle strong {
    font-size: .9rem;
  }

  .top-rank {
    height: 28px;
    right: 8px;
    width: 28px;
  }

  .child-editor summary {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .child-editor summary img {
    width: 48px;
  }
}

/* Mobile admin layout: keep the dashboard usable on small screens. */
@media (max-width: 767.98px) {
  .admin-body {
    background: #f3f6fb;
    overflow-x: hidden;
  }

  .admin-shell,
  .admin-shell.is-sidebar-collapsed {
    display: block;
    min-height: 100vh;
    width: 100%;
  }

  .admin-sidebar,
  .admin-shell.is-sidebar-collapsed .admin-sidebar {
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    height: auto;
    max-height: none;
    overflow: visible;
    padding: .65rem .75rem .75rem;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .admin-brand,
  .admin-shell.is-sidebar-collapsed .admin-brand {
    align-items: center;
    display: grid;
    gap: .2rem;
    grid-template-columns: 38px minmax(0, 1fr);
    margin: 0 0 .55rem;
    padding: .35rem .1rem;
  }

  .admin-brand img {
    height: 38px;
    max-width: 38px;
    object-fit: contain;
    width: 38px;
  }

  .admin-brand span,
  .admin-shell.is-sidebar-collapsed .admin-brand span {
    display: block;
    font-size: .95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-brand small,
  .admin-shell.is-sidebar-collapsed .admin-brand small {
    display: none;
  }

  .admin-sidebar nav,
  .admin-shell.is-sidebar-collapsed .admin-sidebar nav {
    display: flex;
    gap: .45rem;
    grid-template-columns: none;
    margin-inline: -.15rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .05rem .15rem .2rem;
    scrollbar-width: none;
  }

  .admin-sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .admin-sidebar nav a,
  .admin-shell.is-sidebar-collapsed .admin-sidebar nav a {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    flex: 0 0 auto;
    gap: .45rem;
    justify-content: center;
    min-height: 38px;
    padding: .5rem .65rem;
    white-space: nowrap;
  }

  .admin-sidebar nav a i {
    font-size: .95rem;
  }

  .admin-sidebar nav a span,
  .admin-shell.is-sidebar-collapsed .admin-sidebar nav a span {
    display: inline;
    font-size: .86rem;
    line-height: 1.2;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-main {
    min-width: 0;
    width: 100%;
  }

  .admin-topbar {
    align-items: stretch;
    border-radius: 0 0 8px 8px;
    flex-direction: column;
    gap: .75rem;
    padding: .75rem;
    position: sticky;
    top: 103px;
    z-index: 950;
  }

  .admin-topbar-title {
    align-items: center;
    gap: .6rem;
    width: 100%;
  }

  .admin-sidebar-toggle {
    display: none;
  }

  .admin-topbar-title strong {
    font-size: 1rem;
    line-height: 1.35;
  }

  .admin-topbar-title span {
    display: none;
  }

  .admin-actions {
    flex-wrap: nowrap;
    margin-inline: -.15rem;
    overflow-x: auto;
    padding: .05rem .15rem .2rem;
    scrollbar-width: none;
    width: calc(100% + .3rem);
  }

  .admin-actions::-webkit-scrollbar {
    display: none;
  }

  .admin-actions .btn,
  .admin-notification-button {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }

  .admin-content {
    overflow-x: hidden;
    padding: .85rem;
  }

  .admin-page-heading {
    align-items: stretch;
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr;
  }

  .admin-page-heading h1 {
    font-size: 1.45rem;
    line-height: 1.35;
  }

  .admin-page-heading .admin-actions,
  .admin-page-heading .btn {
    width: 100%;
  }

  .admin-page-heading .admin-actions {
    flex-wrap: wrap;
    overflow: visible;
  }

  .admin-stat-grid,
  .admin-dashboard-stats {
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stat-card,
  .dashboard-stat-card,
  .admin-panel {
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  }

  .admin-stat-card {
    min-width: 0;
    padding: .85rem;
  }

  .admin-stat-card strong {
    font-size: 1.55rem;
  }

  .admin-panel {
    margin-bottom: .85rem;
    padding: .85rem;
  }

  .admin-filter-bar,
  .system-form,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .table-responsive {
    border-radius: 8px;
    margin-inline: -.1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    font-size: .9rem;
    min-width: 700px;
  }

  .table-actions {
    align-items: stretch;
    gap: .35rem;
  }

  .table-actions .btn,
  .table-actions button {
    flex: 1 1 auto;
    min-height: 38px;
  }

  .dashboard-main-grid,
  .admin-grid-two,
  .reports-summary-grid,
  .messages-layout,
  .contact-message-body,
  .role-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-list-item,
  .dashboard-user-row,
  .dashboard-teacher-row,
  .contact-admin-item,
  .notification-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .admin-stat-grid,
  .admin-dashboard-stats {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: .65rem;
  }

  .admin-panel {
    padding: .75rem;
  }
}

/* Final homepage overrides: keep the refreshed public landing above older rules. */
.home-hero.pro-home-hero {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .08) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 46%, #eef6ff 100%);
  background-size: 34px 34px, auto;
  padding: clamp(3rem, 6vw, 5.75rem) 0 3rem;
}

.home-hero-grid.pro-hero-grid {
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, .96fr);
}

.home-hero-copy.pro-hero-copy h1 {
  color: #0f172a;
  font-size: clamp(2.35rem, 5.4vw, 4.85rem);
  max-width: 760px;
}

.home-hero-copy.pro-hero-copy .hero-lead {
  color: #475569;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  line-height: 1.9;
  max-width: 720px;
}

.home-hero.pro-home-hero .section-kicker {
  background: #e0f2fe;
  border-color: rgba(37, 99, 235, .16);
  color: #075985;
}

.home-hero-panel.pro-hero-panel {
  align-content: start;
  display: grid;
  gap: 1rem;
  min-height: auto;
}

.home-hero-panel.hero-students-panel {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  justify-items: center;
  min-height: 330px;
  padding: 0;
}

.hero-students-image {
  display: block;
  filter: drop-shadow(0 24px 34px rgba(15, 23, 42, .16));
  height: auto;
  max-height: 430px;
  max-width: min(100%, 560px);
  object-fit: contain;
  width: 100%;
}

@media (max-width: 991.98px) {
  .home-hero-panel.hero-students-panel {
    min-height: 280px;
  }

  .hero-students-image {
    max-height: 320px;
    max-width: min(92vw, 430px);
  }
}

@media (max-width: 575.98px) {
  .home-hero-panel.hero-students-panel {
    min-height: 210px;
  }

  .hero-students-image {
    filter: drop-shadow(0 16px 22px rgba(15, 23, 42, .14));
    max-height: 230px;
    max-width: min(88vw, 330px);
  }
}

/* Admin dashboard/content repairs: restore admin-only presentation rules missing from the live stylesheet. */
.dashboard-heading .btn,
.panel-title-row,
.contact-reply-actions {
  align-items: center;
  display: flex;
  gap: .65rem;
}

.dashboard-heading,
.dashboard-admin-actions,
.admin-section-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
}

.admin-section-title {
  margin-bottom: 1rem;
}

.question-editor {
  max-width: 100%;
}

.admin-dashboard-stats {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.dashboard-stat-card {
  overflow: hidden;
  position: relative;
}

.dashboard-stat-card::after {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 90px;
  inset: auto auto -45px -35px;
  opacity: .08;
  position: absolute;
  width: 90px;
}

.dashboard-stat-card i,
.dashboard-list-icon,
.dashboard-message-icon,
.contact-admin-icon,
.contact-message-avatar {
  align-items: center;
  background: #dbeafe;
  border-radius: 12px;
  color: var(--eqp-primary);
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.dashboard-avatar {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 42px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 42px;
}

.dashboard-avatar img {
  display: block;
  height: 100%;
  max-height: 42px;
  max-width: 42px;
  object-fit: cover;
  width: 100%;
}

.copy-link {
  direction: ltr;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.dashboard-main-grid,
.reports-summary-grid {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
  margin-bottom: 1rem;
}

.dashboard-panel-title,
.reports-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dashboard-panel-title h2,
.panel-title-row h2,
.report-chart-panel h2,
.report-alert-panel h2 {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 0;
}

.dashboard-panel-title p,
.panel-title-row p {
  color: var(--eqp-muted);
  margin: .15rem 0 0;
}

.dashboard-compact-list,
.dashboard-user-list,
.dashboard-teacher-list,
.contact-admin-list,
.contact-inbox,
.message-stream {
  display: grid;
  gap: .75rem;
}

.dashboard-list-item,
.dashboard-user-row,
.dashboard-teacher-row,
.dashboard-action-card,
.contact-admin-item,
.thread-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 12px;
  color: var(--eqp-text);
  display: flex;
  gap: .75rem;
  padding: .85rem;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.dashboard-list-item:hover,
.dashboard-user-row:hover,
.dashboard-teacher-row:hover,
.dashboard-action-card:hover,
.contact-admin-item:hover,
.thread-item:hover,
.thread-item.is-active {
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
  color: var(--eqp-text);
  transform: translateY(-1px);
}

.dashboard-action-card {
  justify-content: space-between;
}

.dashboard-action-card span,
.dashboard-user-info,
.dashboard-message-panel,
.dashboard-user-meta {
  min-width: 0;
}

.dashboard-action-card strong,
.contact-admin-item b,
.admin-nav-badge {
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-weight: 900;
  padding: .25rem .65rem;
}

.dashboard-empty-state {
  background: #f8fafc;
  border: 1px dashed var(--eqp-border);
  border-radius: 12px;
  color: var(--eqp-muted);
  font-weight: 800;
  padding: 1rem;
  text-align: center;
}

.dashboard-teacher-row {
  align-items: flex-start;
  justify-content: space-between;
}

.dashboard-teacher-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.dashboard-teacher-metrics span,
.status-pill {
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-size: .85rem;
  font-weight: 900;
  padding: .3rem .65rem;
}

.status-pill.is-active {
  background: #dcfce7;
  color: #166534;
}

.status-pill.is-muted {
  background: #f1f5f9;
  color: #64748b;
}

.question-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.question-type-tabs button {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 999px;
  color: var(--eqp-text);
  font-weight: 800;
  padding: .45rem .85rem;
}

.question-type-tabs button.is-active {
  background: var(--eqp-primary);
  border-color: var(--eqp-primary);
  color: #fff;
}

.question-type-panel[hidden],
.dictation-tts-settings[hidden] {
  display: none !important;
}

.admin-inline-panel,
.academic-filter-panel,
.report-filter-panel {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 14px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.admin-inline-panel h3 {
  color: var(--eqp-text);
  font-size: 1rem;
  font-weight: 900;
  margin: 0 0 .8rem;
}

.academic-chain-filter {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.academic-path {
  color: var(--eqp-muted);
  display: block;
  font-size: .86rem;
  font-weight: 800;
  margin-top: .2rem;
}

.report-kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.reports-summary-grid .is-wide {
  min-width: 0;
}

.report-compact-table {
  font-size: .92rem;
}

.report-compact-table th,
.report-compact-table td {
  vertical-align: middle;
}

.report-kpi,
.report-chart-panel,
.report-alert-panel {
  border-top: 4px solid var(--eqp-primary);
}

.report-kpi.is-success {
  border-top-color: var(--eqp-success);
}

.report-kpi.is-warning {
  border-top-color: var(--eqp-warning);
}

.report-kpi.is-violet {
  border-top-color: var(--eqp-violet);
}

.report-chart {
  display: block;
  height: 240px !important;
  max-height: 240px;
  min-height: 240px;
  width: 100%;
}

.contact-admin-panel {
  border-top: 4px solid var(--eqp-primary);
}

.contact-admin-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.contact-admin-item.is-unread {
  background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(34, 197, 94, .08));
  border-inline-start: 5px solid var(--eqp-primary);
}

.contact-admin-item strong,
.contact-admin-item small,
.contact-admin-item em {
  display: block;
}

.contact-admin-item small,
.contact-message-summary small,
.contact-message-summary em,
.contact-reply-actions span {
  color: var(--eqp-muted);
}

.contact-admin-item em {
  font-style: normal;
  margin-top: .35rem;
}

.admin-notification-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: var(--eqp-primary);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  position: relative;
  width: 44px;
}

.admin-notification-button span {
  align-items: center;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 900;
  height: 1.25rem;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 .25rem;
  position: absolute;
  right: -6px;
  top: -7px;
}

.contact-message-stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.contact-message-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.contact-message-card.is-unread {
  border-inline-start: 5px solid #ef4444;
}

.contact-message-card.is-replied {
  border-top: 4px solid #22c55e;
}

.contact-message-card summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  list-style: none;
  padding: 1rem;
}

.contact-message-card summary::-webkit-details-marker {
  display: none;
}

.contact-message-body {
  border-top: 1px solid var(--eqp-border);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(240px, .35fr) minmax(0, .65fr);
  padding: 1rem;
}

.contact-sender-card,
.contact-message-thread,
.contact-reply-form,
.message-panel {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 10px;
  padding: 1rem;
}

.contact-sender-card dl {
  display: grid;
  gap: .55rem;
}

.contact-sender-card dl div {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  padding: .65rem;
}

.contact-sender-card dt {
  color: var(--eqp-muted);
  font-size: .82rem;
  font-weight: 800;
}

.contact-sender-card dd {
  color: var(--eqp-text);
  font-weight: 850;
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-message-thread {
  display: grid;
  gap: 1rem;
}

.contact-message-bubble,
.message-bubble {
  border-radius: 12px;
  padding: 1rem;
}

.contact-message-bubble.incoming,
.message-bubble {
  background: #fff;
  border: 1px solid var(--eqp-border);
}

.contact-message-bubble.outgoing {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #14532d;
}

.messages-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, .34fr) minmax(0, .66fr);
}

.thread-list {
  align-self: start;
}

.thread-item {
  align-items: flex-start;
  display: grid;
}

.thread-item strong,
.thread-item span,
.thread-item small,
.message-bubble strong,
.message-bubble time {
  display: block;
}

.thread-item small,
.message-bubble time {
  color: var(--eqp-muted);
  font-size: .85rem;
}

.theme-dark .dashboard-list-item,
.theme-dark .dashboard-user-row,
.theme-dark .dashboard-teacher-row,
.theme-dark .dashboard-empty-state,
.theme-dark .contact-admin-item,
.theme-dark .contact-message-card,
.theme-dark .contact-sender-card,
.theme-dark .contact-message-thread,
.theme-dark .contact-reply-form,
.theme-dark .message-panel,
.theme-dark .thread-item,
.theme-dark .message-bubble,
.theme-dark .question-type-tabs button,
.theme-dark .admin-inline-panel,
.theme-dark .academic-filter-panel,
.theme-dark .report-filter-panel {
  background: #0b1220;
  border-color: #334155;
  color: #e5edf8;
}

.theme-dark .question-type-tabs button.is-active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #fff;
}

.theme-dark .dashboard-stat-card i,
.theme-dark .dashboard-list-icon,
.theme-dark .contact-admin-icon,
.theme-dark .contact-message-avatar,
.theme-dark .dashboard-action-card strong {
  background: #16243a;
  color: #e5edf8;
}

@media (max-width: 991.98px) {
  .dashboard-main-grid,
  .reports-summary-grid,
  .messages-layout,
  .contact-message-body {
    grid-template-columns: 1fr;
  }

  .contact-message-card summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .contact-message-badges {
    grid-column: 1 / -1;
    justify-content: start;
  }
}

.pro-preview-answers span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  min-height: 56px;
}

.pro-preview-answers .is-correct {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.leaderboard-section.pro-leaderboard-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #155e75 100%);
  color: #ffffff;
}

.leaderboard-section.pro-leaderboard-section .section-heading h2,
.leaderboard-section.pro-leaderboard-section .section-heading p {
  color: #ffffff;
}

.leaderboard-carousel.pro-leaderboard-carousel {
  gap: 1rem;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  margin-top: 2rem;
}

.grade-leaderboard-stack.pro-leaderboard-stage {
  min-height: 420px;
}

.grade-leaderboard.pro-leaderboard-slide {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
  box-shadow: 0 28px 60px rgba(2, 6, 23, .28);
  color: #0f172a;
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.grade-leaderboard.pro-leaderboard-slide h3 {
  color: #0f172a;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: .15rem 0 .35rem;
}

.leaderboard-podium {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leader-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-height: 230px;
  padding: 1.25rem 1rem;
  position: relative;
  text-align: center;
}

.leader-card.rank-1 {
  background: #fffbeb;
  border-color: #fde68a;
  min-height: 270px;
  order: 2;
}

.leader-card.rank-2 {
  order: 1;
}

.leader-card.rank-3 {
  order: 3;
}

.leader-avatar {
  height: 104px;
  width: 104px;
}

.leader-card.rank-1 .leader-avatar {
  height: 124px;
  width: 124px;
}

@media (max-width: 991.98px) {
  .home-hero-grid.pro-hero-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-carousel.pro-leaderboard-carousel {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .grade-leaderboard-stack.pro-leaderboard-stage {
    min-height: 650px;
  }

  .leaderboard-podium {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .leader-card,
  .leader-card.rank-1 {
    min-height: auto;
    order: initial;
  }
}

@media (max-width: 575.98px) {
  .leaderboard-carousel.pro-leaderboard-carousel {
    grid-template-columns: 1fr;
  }

  .grade-leaderboard-stack.pro-leaderboard-stage {
    min-height: 720px;
  }
}

/* Homepage component styling */
.home-metric-strip {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.8rem;
  max-width: 720px;
}

.home-metric-strip span {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  color: #475569;
  padding: .85rem 1rem;
}

.home-metric-strip strong {
  color: #2563eb;
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.hero-learning-board {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .11);
  padding: clamp(1.1rem, 3vw, 1.65rem);
}

.learning-board-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.learning-board-head span {
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  font-weight: 800;
  padding: .35rem .75rem;
}

.learning-board-head strong {
  color: #0f172a;
}

.hero-learning-board h2 {
  color: #0f172a;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  font-weight: 900;
  margin: 1.15rem 0;
}

.pro-preview-answers {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pro-preview-answers span {
  align-items: center;
  display: flex;
  font-weight: 900;
  justify-content: center;
}

.learning-board-feedback {
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  display: flex;
  font-weight: 900;
  gap: .55rem;
  margin-top: 1rem;
  padding: .8rem 1rem;
}

.hero-mini-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-mini-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  font-weight: 900;
  gap: .5rem;
  min-height: 96px;
  padding: 1rem .65rem;
  text-align: center;
}

.hero-mini-card i {
  align-items: center;
  background: #facc15;
  border-radius: 8px;
  color: #713f12;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.hero-mini-card:nth-child(2) i {
  background: #dbeafe;
  color: #1d4ed8;
}

.hero-mini-card:nth-child(3) i {
  background: #dcfce7;
  color: #15803d;
}

.section-heading p {
  color: #64748b;
  margin: .6rem auto 0;
  max-width: 680px;
}

.pro-feature-card {
  border-radius: 8px;
  min-height: 220px;
  position: relative;
}

.pro-feature-card::before {
  background: #2563eb;
  border-radius: 999px;
  content: "";
  height: 6px;
  inset-inline: 1.25rem;
  position: absolute;
  top: 1rem;
}

.pro-feature-card.tone-yellow::before { background: #facc15; }
.pro-feature-card.tone-green::before { background: #22c55e; }
.pro-feature-card.tone-purple::before { background: #8b5cf6; }
.pro-feature-card.tone-pink::before { background: #ec4899; }
.pro-feature-card.tone-navy::before { background: #0f172a; }

.pro-steps-section {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.pro-step-item {
  background: #ffffff;
  border-radius: 8px;
}

.pro-steps-section {
  position: relative;
}

.pro-steps-section .section-heading {
  margin-inline: auto;
  max-width: 760px;
  text-align: center;
}

.pro-steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 2rem;
  position: relative;
}

.pro-steps::before {
  background: linear-gradient(90deg, #2563eb, #22c55e, #facc15, #8b5cf6);
  content: "";
  height: 3px;
  inset: 50px 7% auto;
  opacity: .38;
  position: absolute;
}

.step-item.pro-step-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
  display: grid;
  gap: .55rem;
  min-height: 190px;
  overflow: hidden;
  padding: 1rem .8rem;
  position: relative;
  text-align: center;
  z-index: 1;
}

.step-item.pro-step-item::after {
  background: #2563eb;
  content: "";
  height: 5px;
  inset: auto 0 0;
  position: absolute;
}

.step-item.pro-step-item:nth-child(2)::after { background: #22c55e; }
.step-item.pro-step-item:nth-child(3)::after { background: #facc15; }
.step-item.pro-step-item:nth-child(4)::after { background: #8b5cf6; }
.step-item.pro-step-item:nth-child(5)::after { background: #0ea5e9; }
.step-item.pro-step-item:nth-child(6)::after { background: #ec4899; }

.step-item.pro-step-item > span {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: .95rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  justify-self: center;
  width: 34px;
}

.step-item.pro-step-item > i {
  align-items: center;
  background: #2563eb;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.15rem;
  height: 46px;
  justify-content: center;
  justify-self: center;
  width: 46px;
}

.step-item.pro-step-item:nth-child(2) > i { background: #22c55e; }
.step-item.pro-step-item:nth-child(3) > i { background: #f59e0b; }
.step-item.pro-step-item:nth-child(4) > i { background: #8b5cf6; }
.step-item.pro-step-item:nth-child(5) > i { background: #0ea5e9; }
.step-item.pro-step-item:nth-child(6) > i { background: #ec4899; }

.step-item.pro-step-item h3 {
  color: #0f172a;
  font-size: .98rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
}

.step-item.pro-step-item p {
  color: #64748b;
  font-size: .9rem;
  line-height: 1.55;
  margin: 0;
}

.pro-grade-card {
  border-radius: 8px;
  overflow: hidden;
}

.pro-grade-card::after {
  background: linear-gradient(90deg, #2563eb, #22c55e, #facc15);
  content: "";
  display: block;
  height: 4px;
  margin: 1rem -1.35rem -1.35rem;
}

.leaderboard-slide-head {
  text-align: center;
}

.leaderboard-slide-head span {
  color: #2563eb;
  font-weight: 900;
}

.leaderboard-slide-head p {
  color: #64748b;
  margin: 0;
}

.leader-avatar {
  background: #ffffff;
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
  overflow: hidden;
}

.leader-avatar img {
  aspect-ratio: 1;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.leader-card strong {
  color: #0f172a;
  font-size: 1.02rem;
  line-height: 1.35;
}

.leader-card small {
  color: #64748b;
  font-weight: 800;
}

.leader-score {
  background: #2563eb;
  border-radius: 999px;
  color: #ffffff;
  padding: .32rem .75rem;
}

.leader-card.rank-1 .leader-score {
  background: #ca8a04;
}

.leaderboard-empty {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  grid-column: 1 / -1;
  min-height: 240px;
  padding: 2rem;
  text-align: center;
}

.leaderboard-empty i {
  color: #f59e0b;
  font-size: 2.2rem;
}

.leaderboard-carousel.pro-leaderboard-carousel .leaderboard-nav {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 16px 30px rgba(2, 6, 23, .22);
  color: #1d4ed8;
}

@media (max-width: 991.98px) {
  .home-metric-strip {
    grid-template-columns: 1fr;
  }

  .hero-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pro-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pro-steps::before {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .public-compact-navbar .brand-mark {
    flex: 1 1 auto;
    grid-template-columns: 34px minmax(0, 1fr);
    max-width: calc(100vw - 142px);
  }

  .public-compact-navbar .brand-mark img {
    height: 34px;
    width: 34px;
  }

  .public-compact-navbar .brand-mark span {
    display: block;
    font-size: .82rem;
    max-width: 100%;
  }

  .public-start-button span {
    display: none;
  }

  .public-start-button {
    min-height: 40px;
    padding-inline: .72rem;
    width: 40px;
  }

  .public-menu-button {
    height: 40px;
    width: 40px;
  }

  .home-hero.pro-home-hero {
    padding-top: 2.35rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-mini-grid,
  .pro-preview-answers {
    grid-template-columns: 1fr;
  }

  .pro-steps {
    grid-template-columns: 1fr;
  }

  .step-item.pro-step-item {
    min-height: 0;
    text-align: start;
  }

  .step-item.pro-step-item > span,
  .step-item.pro-step-item > i {
    justify-self: start;
  }

  .leaderboard-carousel.pro-leaderboard-carousel .leaderboard-nav {
    position: static;
    width: 100%;
  }
}

/* Homepage polish pass: clearer colors, calmer density, fixed leaderboard sizing. */
.home-hero.pro-home-hero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .18) 0%, rgba(34, 197, 94, .13) 34%, rgba(250, 204, 21, .18) 68%, rgba(139, 92, 246, .14) 100%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: clamp(2.4rem, 5vw, 4.25rem) 0 clamp(2rem, 4vw, 3rem);
}

.home-hero-copy.pro-hero-copy h1 {
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.16;
  margin-bottom: .95rem;
}

.home-hero-copy.pro-hero-copy .hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
}

.home-hero.pro-home-hero .btn-xl {
  min-height: 48px;
  padding: .75rem 1.05rem;
}

.home-metric-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.home-metric-strip span {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  padding: .7rem .85rem;
}

.home-metric-strip span:nth-child(1) {
  border-color: rgba(37, 99, 235, .28);
}

.home-metric-strip span:nth-child(2) {
  border-color: rgba(34, 197, 94, .28);
}

.home-metric-strip span:nth-child(3) {
  border-color: rgba(139, 92, 246, .28);
}

.home-metric-strip span:nth-child(2) strong {
  color: #16a34a;
}

.home-metric-strip span:nth-child(3) strong {
  color: #7c3aed;
}

.hero-learning-board {
  box-shadow: 0 18px 42px rgba(15, 23, 42, .1);
  padding: clamp(1rem, 2vw, 1.35rem);
}

.hero-learning-board h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  margin: .95rem 0;
}

.pro-preview-answers span {
  min-height: 48px;
}

.learning-board-feedback {
  margin-top: .8rem;
  padding: .7rem .85rem;
}

.hero-mini-card {
  min-height: 78px;
  padding: .75rem .55rem;
}

.hero-mini-card i {
  height: 36px;
  width: 36px;
}

.pro-feature-card {
  min-height: 190px;
  padding-top: 1.55rem;
}

.pro-leaderboard-section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.leaderboard-section.pro-leaderboard-section {
  background:
    linear-gradient(135deg, #1e3a8a 0%, #2563eb 38%, #0f766e 100%);
}

.leaderboard-section.pro-leaderboard-section .section-heading {
  margin-inline: auto;
  max-width: 760px;
  text-align: center;
}

.leaderboard-section.pro-leaderboard-section .section-kicker {
  background: #facc15;
  border-color: #facc15;
  color: #0f172a;
  font-weight: 900;
}

.leaderboard-section.pro-leaderboard-section .section-heading h2 {
  margin-inline: auto;
  text-align: center;
}

.leaderboard-section.pro-leaderboard-section .section-heading p {
  margin-inline: auto;
  max-width: 620px;
  text-align: center;
}

.leaderboard-carousel.pro-leaderboard-carousel {
  align-items: stretch;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  max-width: 940px;
}

.grade-leaderboard-stack.pro-leaderboard-stage {
  min-height: 0;
  position: static;
}

.grade-leaderboard.pro-leaderboard-slide {
  display: none;
  inset: auto;
  min-height: 0;
  opacity: 1;
  overflow: hidden;
  pointer-events: auto;
  position: static;
  transform: none;
  visibility: visible;
}

.grade-leaderboard.pro-leaderboard-slide.is-active {
  display: grid;
}

.leaderboard-podium {
  align-items: stretch;
  gap: .85rem;
}

.leader-card,
.leader-card.rank-1 {
  min-height: 210px;
  order: initial;
  padding: 1rem .85rem;
}

.leader-card.rank-1 {
  background: #fffbeb;
  border-color: #facc15;
}

.leader-avatar,
.leader-card.rank-1 .leader-avatar {
  height: 90px;
  width: 90px;
}

.leader-card .top-rank {
  right: .75rem;
  top: .75rem;
}

.leaderboard-empty {
  min-height: 190px;
}

@media (max-width: 991.98px) {
  .leaderboard-carousel.pro-leaderboard-carousel {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .grade-leaderboard-stack.pro-leaderboard-stage {
    min-height: 0;
  }

  .leaderboard-podium {
    grid-template-columns: 1fr;
  }

  .leader-card,
  .leader-card.rank-1 {
    min-height: 150px;
  }
}

@media (max-width: 575.98px) {
  .home-metric-strip {
    grid-template-columns: 1fr;
  }

  .leaderboard-carousel.pro-leaderboard-carousel {
    gap: .75rem;
    grid-template-columns: 1fr;
  }
}

.tenant-settings-heading {
  align-items: flex-end;
  gap: 1rem;
}

.tenant-settings-heading .admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tenant-settings-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
}

.tenant-brand-preview {
  position: sticky;
  top: 1rem;
}

.tenant-preview-card,
.tenant-settings-section,
.tenant-settings-control-center {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

.tenant-preview-card {
  overflow: hidden;
  padding: 1rem;
  position: relative;
  text-align: center;
}

.tenant-preview-card::before {
  background:
    linear-gradient(135deg, var(--tenant-preview-primary, var(--eqp-primary)), var(--tenant-preview-secondary, var(--eqp-success)));
  content: "";
  display: block;
  height: 76px;
  margin: -1rem -1rem 0;
}

.tenant-preview-top {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: .82rem;
  font-weight: 800;
  justify-content: space-between;
  margin: -64px 0 1.2rem;
  position: relative;
  z-index: 1;
}

.tenant-preview-top strong {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: .2rem .6rem;
}

.tenant-preview-logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
  display: inline-flex;
  height: 86px;
  justify-content: center;
  margin-top: 1.2rem;
  overflow: hidden;
  width: 86px;
}

.tenant-preview-logo img {
  display: block;
  height: 100%;
  object-fit: contain;
  padding: .45rem;
  width: 100%;
}

.tenant-preview-logo i {
  color: var(--tenant-preview-primary, var(--eqp-primary));
  font-size: 2.1rem;
}

.tenant-preview-card h2 {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 900;
  margin: .85rem 0 .25rem;
}

.tenant-preview-card p {
  color: var(--eqp-muted);
  margin: 0;
}

.tenant-preview-swatches {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin: 1rem 0;
}

.tenant-preview-swatches span {
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
  height: 30px;
  width: 30px;
}

.tenant-preview-meta {
  display: grid;
  gap: .5rem;
  text-align: start;
}

.tenant-preview-meta span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: #334155;
  display: flex;
  font-size: .9rem;
  gap: .55rem;
  padding: .65rem .75rem;
}

.tenant-preview-meta i {
  color: var(--tenant-preview-primary, var(--eqp-primary));
  width: 18px;
}

.tenant-settings-form {
  min-width: 0;
}

.tenant-settings-section {
  padding: 1rem;
}

.tenant-settings-section-head,
.tenant-control-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--eqp-border);
  display: flex;
  gap: .85rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.tenant-settings-section-head > i {
  align-items: center;
  background: #eff6ff;
  border-radius: 8px;
  color: var(--eqp-primary);
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.tenant-settings-section-head h2,
.tenant-control-heading h2 {
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 900;
  margin: 0;
}

.tenant-settings-section-head p,
.tenant-control-heading p {
  color: var(--eqp-muted);
  margin: .25rem 0 0;
}

.tenant-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-field,
.tenant-toggle-card {
  min-width: 0;
}

.tenant-field {
  display: grid;
  gap: .4rem;
}

.tenant-field > span,
.tenant-toggle-card strong {
  color: #334155;
  font-size: .9rem;
  font-weight: 900;
}

.tenant-field-wide {
  grid-column: 1 / -1;
}

.tenant-field textarea {
  min-height: 92px;
  resize: vertical;
}

.upload-status,
.tenant-toggle-card small {
  color: var(--eqp-muted);
  display: block;
  font-size: .82rem;
  margin-top: .25rem;
}

.tenant-color-field > div {
  align-items: center;
  display: grid;
  gap: .65rem;
  grid-template-columns: 64px minmax(0, 1fr);
}

.tenant-color-field .form-control-color {
  height: 44px;
  width: 64px;
}

.tenant-color-field strong {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
  padding: .62rem .75rem;
}

.tenant-toggle-card {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: .75rem;
  padding: .8rem .9rem;
}

.tenant-toggle-card .form-check-input {
  flex: 0 0 auto;
  margin: .18rem 0 0;
}

.tenant-toggle-card span {
  display: block;
}

.tenant-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.tenant-settings-actions .btn {
  min-height: 46px;
}

.tenant-settings-control-center {
  padding: 1rem;
}

.tenant-control-heading {
  justify-content: space-between;
}

.tenant-settings-control-center .system-tabs {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .5rem;
}

.tenant-settings-control-center .system-tabs .nav-link {
  border-radius: 8px;
  color: #334155;
  font-weight: 900;
}

.tenant-settings-control-center .system-tabs .nav-link.active {
  background: var(--eqp-primary);
  color: #fff;
}

.tenant-settings-control-center .admin-panel {
  box-shadow: none;
}

.tenant-settings-control-center .footer-editor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-settings-control-center .footer-editor-card,
.tenant-settings-control-center .admin-panel {
  border-radius: 8px;
}

.tenant-settings-control-center .footer-editor-card-wide {
  grid-column: 1 / -1;
}

.tenant-settings-control-center .footer-card-title,
.tenant-settings-control-center .footer-editor-heading {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.tenant-settings-control-center .footer-card-title {
  justify-content: flex-start;
  margin-bottom: .85rem;
}

.tenant-settings-control-center .footer-card-title i {
  color: var(--eqp-primary);
  margin-top: .18rem;
}

.tenant-settings-control-center .footer-card-title h3 {
  font-size: 1rem;
  font-weight: 900;
  margin: 0;
}

.tenant-settings-control-center .footer-link-row {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  margin-bottom: .75rem;
  padding: .75rem;
}

@media (max-width: 1199.98px) {
  .tenant-settings-layout {
    grid-template-columns: 1fr;
  }

  .tenant-brand-preview {
    position: static;
  }

  .tenant-preview-card {
    text-align: start;
  }

  .tenant-preview-logo {
    margin-top: .75rem;
  }
}

@media (max-width: 767.98px) {
  .tenant-settings-heading {
    align-items: stretch;
  }

  .tenant-settings-heading .admin-actions,
  .tenant-settings-actions,
  .tenant-settings-control-center .footer-editor-heading {
    justify-content: stretch;
  }

  .tenant-settings-heading .admin-actions .btn,
  .tenant-settings-actions .btn,
  .tenant-settings-control-center .footer-editor-heading .btn {
    width: 100%;
  }

  .tenant-form-grid,
  .tenant-settings-control-center .footer-editor-grid {
    grid-template-columns: 1fr;
  }

  .tenant-settings-section,
  .tenant-settings-control-center {
    padding: .85rem;
  }

  .tenant-settings-section-head,
  .tenant-control-heading,
  .tenant-settings-control-center .footer-editor-heading {
    display: grid;
  }

  .tenant-color-field > div {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .tenant-settings-control-center .system-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.worksheet-builder-hero {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, .13), rgba(37, 99, 235, .1)),
    #f8fafc;
  border-bottom: 1px solid var(--eqp-border);
  padding: 3.25rem 0 2.75rem;
}

.worksheet-builder-hero .section-kicker,
.worksheet-form-head .section-kicker {
  background: #e0f2fe;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 999px;
  color: #075985;
  padding: .28rem .75rem;
}

.worksheet-builder-hero h1 {
  color: #0f172a;
  font-size: clamp(2rem, 3.7vw, 3.45rem);
  max-width: 860px;
}

.worksheet-builder-hero p {
  max-width: 760px;
}

.worksheet-builder-section {
  background: #f8fafc;
  padding: 2.75rem 0 4rem;
}

.worksheet-builder-layout {
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}

.worksheet-builder-guide,
.worksheet-builder-card {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .07);
}

.worksheet-builder-guide {
  display: grid;
  gap: .85rem;
  padding: 1.25rem;
  position: sticky;
  top: 96px;
}

.worksheet-builder-guide .guide-icon,
.worksheet-form-head > i {
  align-items: center;
  background: #eff6ff;
  border-radius: 8px;
  color: var(--eqp-primary);
  display: inline-flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.worksheet-builder-guide h2,
.worksheet-form-head h2,
.worksheet-type-section h3 {
  color: #0f172a;
  font-weight: 900;
  margin: 0;
}

.worksheet-builder-guide h2 {
  font-size: 1.25rem;
}

.worksheet-builder-guide p,
.worksheet-builder-guide li,
.worksheet-section-title-row p,
.worksheet-builder-actions p {
  color: var(--eqp-muted);
}

.worksheet-builder-guide p,
.worksheet-section-title-row p,
.worksheet-builder-actions p {
  margin: 0;
}

.worksheet-builder-guide ul {
  display: grid;
  gap: .65rem;
  list-style: none;
  margin: .25rem 0 0;
  padding: 0;
}

.worksheet-builder-guide li {
  align-items: flex-start;
  display: flex;
  gap: .55rem;
}

.worksheet-builder-guide li i {
  color: #16a34a;
  margin-top: .25rem;
}

.worksheet-builder-card {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
  padding: 1.35rem;
}

.worksheet-form-head,
.worksheet-section-title-row,
.worksheet-builder-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.worksheet-form-head {
  border-bottom: 1px solid var(--eqp-border);
  padding-bottom: 1rem;
}

.worksheet-form-head h2 {
  font-size: 1.35rem;
  margin-top: .55rem;
}

.worksheet-ready-strip {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: .8rem;
}

.worksheet-ready-strip span {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: .9rem;
  font-weight: 900;
  gap: .45rem;
  min-width: 0;
}

.worksheet-ready-strip i {
  color: var(--eqp-primary);
  flex: 0 0 auto;
}

.worksheet-step-section {
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.worksheet-step-heading {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
}

.worksheet-step-heading > span {
  align-items: center;
  background: var(--eqp-primary);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 34px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
}

.worksheet-step-heading h3 {
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 900;
  margin: 0;
}

.worksheet-step-heading p {
  color: var(--eqp-muted);
  margin: .25rem 0 0;
}

.worksheet-step-heading-inline {
  margin: 0;
}

.worksheet-path-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.worksheet-path-wide {
  grid-column: 1 / -1;
}

.worksheet-builder-card .form-label {
  color: #334155;
  font-size: .93rem;
  margin-bottom: .45rem;
}

.worksheet-builder-card .form-control,
.worksheet-builder-card .form-select {
  background-color: #fff;
  border-color: #cbd5e1;
  min-height: 48px;
}

.worksheet-builder-card .form-control:focus,
.worksheet-builder-card .form-select:focus {
  border-color: var(--eqp-primary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .16);
}

.worksheet-builder-card .form-select:disabled {
  background-color: #f1f5f9;
  color: #64748b;
}

.worksheet-options-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.worksheet-options-grid > div:first-child {
  grid-column: span 2;
}

.worksheet-type-section {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.worksheet-section-title-row {
  align-items: flex-start;
}

.worksheet-section-title-row h3 {
  font-size: 1.12rem;
}

.worksheet-section-title-row > div:first-child {
  max-width: 700px;
}

.worksheet-section-title-row > div:last-child {
  min-width: 220px;
}

.worksheet-type-table {
  display: grid;
  gap: .7rem;
}

.worksheet-type-table-head,
.worksheet-type-row {
  display: grid;
  gap: .75rem;
  grid-template-columns: 62px minmax(190px, 1fr) 120px 120px 120px;
}

.worksheet-type-table-head {
  color: #64748b;
  font-size: .82rem;
  font-weight: 900;
  padding: 0 .85rem;
}

.worksheet-type-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  cursor: pointer;
  margin: 0;
  padding: .85rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.worksheet-final-section {
  background: #f8fafc;
}

.worksheet-type-row:hover,
.worksheet-type-row.is-enabled {
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 10px 28px rgba(37, 99, 235, .08);
}

.worksheet-type-row:hover {
  transform: translateY(-1px);
}

.worksheet-type-toggle {
  align-items: center;
  background: #eff6ff;
  border-radius: 8px;
  display: flex;
  height: 46px;
  justify-content: center;
}

.worksheet-type-toggle input {
  cursor: pointer;
  height: 20px;
  width: 20px;
}

.worksheet-type-copy {
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.worksheet-type-copy strong {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
}

.worksheet-type-copy small {
  color: var(--eqp-muted);
  line-height: 1.6;
}

.worksheet-type-row .form-control {
  min-height: 44px;
  text-align: center;
}

.worksheet-builder-actions {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  padding: 1rem;
}

.worksheet-builder-actions .btn {
  flex: 0 0 auto;
  min-width: 210px;
}

.worksheet-builder-actions p {
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .worksheet-builder-layout {
    grid-template-columns: 1fr;
  }

  .worksheet-builder-guide {
    position: static;
  }

  .worksheet-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worksheet-ready-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .worksheet-type-table-head {
    display: none;
  }

  .worksheet-type-row {
    grid-template-columns: 50px minmax(0, 1fr) repeat(3, minmax(82px, 1fr));
  }
}

@media (max-width: 767.98px) {
  .worksheet-builder-hero {
    padding: 2.35rem 0 2rem;
  }

  .worksheet-builder-section {
    padding: 1.25rem 0 2.5rem;
  }

  .worksheet-builder-card,
  .worksheet-builder-guide,
  .worksheet-type-section,
  .worksheet-step-section,
  .worksheet-builder-actions {
    padding: .9rem;
  }

  .worksheet-ready-strip,
  .worksheet-path-grid {
    grid-template-columns: 1fr;
  }

  .worksheet-step-heading {
    gap: .6rem;
  }

  .worksheet-step-heading > span {
    flex-basis: 30px;
    height: 30px;
  }

  .worksheet-form-head,
  .worksheet-section-title-row,
  .worksheet-builder-actions {
    align-items: stretch;
    display: grid;
  }

  .worksheet-form-head > i {
    display: none;
  }

  .worksheet-options-grid,
  .worksheet-options-grid > div:first-child {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .worksheet-path-wide {
    grid-column: auto;
  }

  .worksheet-section-title-row > div:last-child {
    min-width: 0;
  }

  .worksheet-type-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .worksheet-type-row > span:nth-child(n+3) {
    grid-column: 1 / -1;
  }

  .worksheet-type-row > span:nth-child(3)::before,
  .worksheet-type-row > span:nth-child(4)::before,
  .worksheet-type-row > span:nth-child(5)::before {
    color: #64748b;
    display: block;
    font-size: .78rem;
    font-weight: 900;
    margin-bottom: .25rem;
  }

  .worksheet-type-row > span:nth-child(3)::before {
    content: "عدد الأسئلة";
  }

  .worksheet-type-row > span:nth-child(4)::before {
    content: "درجة كل سؤال";
  }

  .worksheet-type-row > span:nth-child(5)::before {
    content: "ترتيب الظهور";
  }

  .worksheet-builder-actions .btn {
    min-width: 0;
    width: 100%;
  }
}

.public-compact-navbar .container {
  column-gap: .65rem;
}

.public-compact-navbar .brand-mark {
  flex: 0 0 320px;
  grid-template-columns: 44px minmax(0, 1fr);
}

.public-compact-navbar .brand-mark span {
  font-size: 1.05rem;
}

.public-inline-nav {
  gap: .35rem;
}

.public-inline-nav a {
  font-size: .96rem;
  padding: .38rem .48rem;
}

.public-inline-nav a::after {
  inset-inline: .48rem;
}

.public-header-actions {
  gap: .45rem;
}

.public-header-actions .btn {
  font-size: .96rem;
  min-height: 42px;
  padding: .58rem .78rem;
}

.public-menu-button {
  height: 42px;
  width: 42px;
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .public-compact-navbar .brand-mark {
    flex: 0 0 255px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .public-compact-navbar .brand-mark img {
    height: 40px;
    width: 40px;
  }

  .public-compact-navbar .brand-mark small {
    display: none;
  }

  .public-inline-nav {
    display: flex;
    gap: .18rem;
  }

  .public-inline-nav a {
    font-size: .88rem;
    padding: .32rem .34rem;
  }

  .public-inline-nav a::after {
    inset-inline: .34rem;
  }

  .public-header-actions {
    gap: .3rem;
  }

  .public-header-actions .btn {
    font-size: .9rem;
    min-height: 40px;
    padding: .5rem .58rem;
  }

  .public-menu-button {
    height: 40px;
    width: 40px;
  }
}

.info-hero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(20, 184, 166, .1)),
    #f8fafc;
  border-bottom: 1px solid var(--eqp-border);
  padding: 3.5rem 0 3rem;
}

.info-hero h1 {
  color: #0f172a;
  font-size: clamp(2rem, 3.8vw, 3.55rem);
  font-weight: 900;
  max-width: 900px;
}

.info-hero p {
  color: #334155;
  font-size: 1.12rem;
  line-height: 1.9;
  max-width: 780px;
}

.info-page-section {
  background: #f8fafc;
  padding: 3rem 0 4rem;
}

.info-layout,
.info-intro-grid {
  align-items: start;
  display: grid;
  gap: 1.25rem;
}

.info-layout {
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
}

.info-intro-grid {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  margin-bottom: 1.25rem;
}

.info-content-card,
.info-side-nav,
.info-stat-panel,
.info-feature-card,
.info-split-panel {
  background: #fff;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .06);
}

.info-content-card {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem;
}

.info-content-card h2,
.info-feature-card h2,
.info-split-panel h2,
.info-highlight-box h2 {
  color: #0f172a;
  font-weight: 900;
  margin: 0;
}

.info-content-card p,
.info-feature-card p,
.info-split-panel p,
.info-highlight-box p,
.info-content-block p {
  color: #475569;
  line-height: 1.9;
  margin: 0;
}

.info-content-block {
  border-bottom: 1px solid var(--eqp-border);
  display: grid;
  gap: .65rem;
  padding-bottom: 1rem;
}

.info-content-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-side-nav {
  display: grid;
  gap: .55rem;
  padding: 1rem;
  position: sticky;
  top: 96px;
}

.info-side-nav a {
  border-radius: 8px;
  color: #334155;
  font-weight: 900;
  padding: .65rem .75rem;
  text-decoration: none;
  transition: background-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.info-side-nav a:hover,
.info-side-nav a:focus {
  background: #eff6ff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .1);
  color: var(--eqp-primary);
  transform: translateX(-4px);
}

.info-check-list {
  display: grid;
  gap: .6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-check-list li {
  color: #334155;
  font-weight: 800;
  line-height: 1.7;
  padding-inline-start: 1.55rem;
  position: relative;
}

.info-check-list li::before {
  color: #16a34a;
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  inset-inline-start: 0;
  position: absolute;
  top: .1rem;
}

.info-highlight-box {
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 8px;
  display: flex;
  gap: .85rem;
  padding: 1rem;
}

.info-highlight-box > i {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--eqp-primary);
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
}

.info-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.info-feature-card {
  display: grid;
  gap: .7rem;
  padding: 1rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.info-feature-card > i {
  color: var(--eqp-primary);
  font-size: 1.6rem;
}

.info-feature-card:hover,
.info-feature-card:focus-within {
  border-color: rgba(37, 99, 235, .28);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .1);
  transform: translateY(-3px);
}

.info-stat-panel {
  display: grid;
  gap: .75rem;
  padding: 1rem;
}

.info-stat-panel div {
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  padding: .9rem;
}

.info-stat-panel strong {
  color: var(--eqp-primary);
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
}

.info-stat-panel span {
  color: #334155;
  font-weight: 900;
}

.info-split-panel {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  margin-bottom: 1.25rem;
  padding: 1.2rem;
}

.info-pill-list,
.contact-reasons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.info-pill-list span,
.contact-reasons-grid span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--eqp-border);
  border-radius: 8px;
  color: #334155;
  display: inline-flex;
  font-weight: 900;
  gap: .45rem;
  padding: .55rem .7rem;
}

.contact-school-box {
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.contact-form-head {
  display: grid;
  gap: .35rem;
}

.enhanced-contact-info {
  align-content: start;
}

.enhanced-contact-info a {
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.enhanced-contact-info a:hover,
.enhanced-contact-info a:focus {
  background: #eff6ff;
  color: var(--eqp-primary);
  transform: translateX(-3px);
}

@media (max-width: 991.98px) {
  .info-layout,
  .info-intro-grid,
  .info-split-panel {
    grid-template-columns: 1fr;
  }

  .info-side-nav {
    position: static;
  }

  .info-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .info-hero {
    padding: 2.35rem 0 2rem;
  }

  .info-page-section {
    padding: 1.25rem 0 2.5rem;
  }

  .info-content-card,
  .info-side-nav,
  .info-stat-panel,
  .info-feature-card,
  .info-split-panel,
  .info-highlight-box {
    padding: .9rem;
  }

  .info-highlight-box,
  .contact-school-box {
    display: grid;
  }

  .contact-school-box .btn {
    width: 100%;
  }
}

/* Final admin mobile overrides placed last so older dashboard rules cannot win. */
@media (max-width: 767.98px) {
  .admin-shell,
  .admin-shell.is-sidebar-collapsed {
    display: block;
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .admin-sidebar,
  .admin-shell.is-sidebar-collapsed .admin-sidebar {
    height: auto;
    overflow: visible;
    padding: .65rem .75rem .75rem;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .admin-brand,
  .admin-shell.is-sidebar-collapsed .admin-brand {
    display: grid;
  }

  .admin-sidebar nav,
  .admin-shell.is-sidebar-collapsed .admin-sidebar nav {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    white-space: nowrap;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar nav a span,
  .admin-sidebar nav a span {
    display: inline;
  }

  .admin-topbar {
    flex-direction: column;
    padding: .75rem;
    top: 103px;
  }

  .admin-sidebar-toggle {
    display: none;
  }

  .admin-content {
    padding: .85rem;
  }

  .admin-stat-grid,
  .admin-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid,
  .admin-grid-two,
  .messages-layout,
  .reports-summary-grid,
  .contact-message-body,
  .role-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .admin-stat-grid,
  .admin-dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* Professional dark theme overrides. Scoped to .theme-dark only; daytime styles are untouched. */
.theme-dark {
  --eqp-text: #e5edf8;
  --eqp-muted: #9fb0c8;
  --eqp-bg: #0b1220;
  --eqp-white: #101a2d;
  --eqp-border: #23324a;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .14), transparent 34rem),
    radial-gradient(circle at bottom left, rgba(34, 197, 94, .08), transparent 28rem),
    #0b1220;
  color: #e5edf8;
  color-scheme: dark;
}

.theme-dark a {
  color: #93c5fd;
}

.theme-dark .site-header,
.theme-dark .public-compact-navbar,
.theme-dark .admin-topbar {
  background: rgba(15, 23, 42, .94);
  border-color: #23324a;
  box-shadow: 0 14px 35px rgba(2, 6, 23, .34);
}

.theme-dark .public-compact-navbar .brand-mark,
.theme-dark .public-inline-nav a,
.theme-dark .admin-topbar strong,
.theme-dark .admin-brand,
.theme-dark .footer-brand {
  color: #f8fafc;
}

.theme-dark .public-compact-navbar .brand-mark small,
.theme-dark .admin-topbar span,
.theme-dark .section-heading p,
.theme-dark .hero-lead,
.theme-dark .info-hero p,
.theme-dark .worksheet-builder-hero p,
.theme-dark .magazine-reader-body,
.theme-dark .article-list-content p,
.theme-dark .content-panel p {
  color: #9fb0c8;
}

.theme-dark .public-inline-nav a:hover,
.theme-dark .public-inline-nav a:focus,
.theme-dark .public-header-menu .dropdown-item:hover,
.theme-dark .public-header-menu .dropdown-item:focus,
.theme-dark .info-side-nav a:hover,
.theme-dark .info-side-nav a:focus {
  background: rgba(96, 165, 250, .14);
  color: #bfdbfe;
}

.theme-dark .public-menu-button,
.theme-dark .public-header-menu,
.theme-dark .dropdown-menu,
.theme-dark .pwa-install-banner,
.theme-dark .content-panel,
.theme-dark .auth-unified-panel,
.theme-dark .admin-panel,
.theme-dark .admin-stat-card,
.theme-dark .admin-filter-bar,
.theme-dark .dashboard-stat-card,
.theme-dark .dashboard-list-item,
.theme-dark .dashboard-user-row,
.theme-dark .dashboard-teacher-row,
.theme-dark .dashboard-action-card,
.theme-dark .dashboard-empty-state,
.theme-dark .contact-admin-item,
.theme-dark .contact-message-card,
.theme-dark .contact-sender-card,
.theme-dark .contact-message-thread,
.theme-dark .contact-reply-form,
.theme-dark .message-panel,
.theme-dark .thread-item,
.theme-dark .message-bubble,
.theme-dark .question-type-tabs button,
.theme-dark .admin-inline-panel,
.theme-dark .academic-filter-panel,
.theme-dark .report-filter-panel,
.theme-dark .info-content-card,
.theme-dark .info-side-nav,
.theme-dark .info-stat-panel,
.theme-dark .info-feature-card,
.theme-dark .info-split-panel,
.theme-dark .magazine-reader,
.theme-dark .magazine-sidebar-card,
.theme-dark .article-clean-card,
.theme-dark .magazine-cover-card,
.theme-dark .worksheet-builder-guide,
.theme-dark .worksheet-builder-card,
.theme-dark .grade-leaderboard,
.theme-dark .grade-leaderboard.pro-leaderboard-slide,
.theme-dark .leaderboard-carousel.pro-leaderboard-carousel,
.theme-dark .profile-children article,
.theme-dark .system-checklist > div,
.theme-dark .activity-list div {
  background: rgba(15, 23, 42, .92);
  border-color: #23324a;
  box-shadow: 0 18px 46px rgba(2, 6, 23, .28);
  color: #e5edf8;
}

.theme-dark .home-hero,
.theme-dark .home-hero.pro-home-hero,
.theme-dark .info-hero,
.theme-dark .worksheet-builder-hero,
.theme-dark .leaderboard-section,
.theme-dark .leaderboard-section.pro-leaderboard-section,
.theme-dark .info-page-section,
.theme-dark .worksheet-builder-section,
.theme-dark .page-section,
.theme-dark .auth-page {
  background:
    linear-gradient(90deg, rgba(96, 165, 250, .06) 1px, transparent 1px),
    linear-gradient(180deg, #0b1220 0%, #111c31 48%, #0b1220 100%);
  background-size: 34px 34px, auto;
  border-color: #23324a;
}

.theme-dark .home-hero-copy h1,
.theme-dark .home-hero-copy.pro-hero-copy h1,
.theme-dark .inner-hero h1,
.theme-dark .info-hero h1,
.theme-dark .worksheet-builder-hero h1,
.theme-dark .content-panel h2,
.theme-dark .info-content-card h2,
.theme-dark .info-feature-card h2,
.theme-dark .info-split-panel h2,
.theme-dark .info-highlight-box h2,
.theme-dark .worksheet-builder-guide h2,
.theme-dark .worksheet-builder-card h2,
.theme-dark .magazine-reader h1,
.theme-dark .article-clean-head h2,
.theme-dark .dashboard-panel-title h2,
.theme-dark .admin-page-heading h1,
.theme-dark .admin-panel h2 {
  color: #f8fafc;
}

.theme-dark .section-kicker,
.theme-dark .home-hero.pro-home-hero .section-kicker,
.theme-dark .worksheet-builder-hero .section-kicker,
.theme-dark .leaderboard-section.pro-leaderboard-section .section-kicker,
.theme-dark .info-pill-list span,
.theme-dark .contact-reasons-grid span,
.theme-dark .system-targets span,
.theme-dark .profile-chip {
  background: rgba(37, 99, 235, .16);
  border-color: rgba(147, 197, 253, .22);
  color: #bfdbfe;
}

.theme-dark .form-control,
.theme-dark .form-select,
.theme-dark .form-check-input,
.theme-dark textarea,
.theme-dark input,
.theme-dark select {
  background-color: #0f1b2e;
  border-color: #334155;
  color: #e5edf8;
}

.theme-dark .form-control:focus,
.theme-dark .form-select:focus,
.theme-dark textarea:focus,
.theme-dark input:focus,
.theme-dark select:focus {
  background-color: #111f35;
  border-color: #60a5fa;
  box-shadow: 0 0 0 .2rem rgba(96, 165, 250, .18);
  color: #fff;
}

.theme-dark .form-control::placeholder,
.theme-dark textarea::placeholder,
.theme-dark input::placeholder {
  color: #7f91aa;
}

.theme-dark .form-label,
.theme-dark .auth-form .form-label,
.theme-dark .worksheet-builder-card .form-label,
.theme-dark .system-form .form-label,
.theme-dark .admin-table th {
  color: #cbd5e1;
}

.theme-dark .auth-tabs,
.theme-dark .question-type-tabs,
.theme-dark .admin-sidebar nav a,
.theme-dark .info-stat-panel div,
.theme-dark .worksheet-type-row,
.theme-dark .pro-preview-answers span {
  background: rgba(2, 6, 23, .34);
  border-color: #23324a;
  color: #dbeafe;
}

.theme-dark .auth-tabs .nav-link,
.theme-dark .dropdown-item,
.theme-dark .info-side-nav a,
.theme-dark .site-footer a,
.theme-dark .article-clean-card > a {
  color: #dbeafe;
}

.theme-dark .btn-light,
.theme-dark .btn-outline-primary,
.theme-dark .theme-toggle-button,
.theme-dark .home-hero .btn-light,
.theme-dark .public-worksheet-button {
  background: rgba(15, 23, 42, .86);
  border-color: #3b4b66;
  color: #dbeafe;
}

.theme-dark .btn-light:hover,
.theme-dark .btn-outline-primary:hover,
.theme-dark .theme-toggle-button:hover,
.theme-dark .public-worksheet-button:hover {
  background: rgba(37, 99, 235, .22);
  border-color: #60a5fa;
  color: #fff;
}

.theme-dark .btn-primary,
.theme-dark .home-hero .btn-primary {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border-color: #60a5fa;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .26);
}

.theme-dark .table,
.theme-dark .admin-table {
  --bs-table-bg: transparent;
  --bs-table-color: #e5edf8;
  --bs-table-border-color: #23324a;
  color: #e5edf8;
}

.theme-dark .table-responsive {
  border-color: #23324a;
}

.theme-dark .alert,
.theme-dark .badge {
  border-color: rgba(147, 197, 253, .2);
}

.theme-dark .site-footer {
  background: #050a14 !important;
  border-top: 1px solid #23324a;
  color: #e5edf8 !important;
}

.theme-dark .footer-credit-line,
.theme-dark .footer-bottom,
.theme-dark .site-footer p {
  color: #9fb0c8 !important;
}

.theme-dark .app-loading-overlay strong {
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
}

.theme-dark .app-loading-spinner {
  border-color: #1e3a5f;
  border-top-color: #60a5fa;
}

.theme-dark .admin-sidebar {
  background: #070d19;
  border-color: #23324a;
}

.theme-dark .admin-sidebar nav a:hover,
.theme-dark .admin-sidebar nav a:focus {
  background: rgba(96, 165, 250, .16);
}

.theme-dark .magazine-reader-body img,
.theme-dark .magazine-cover-card img,
.theme-dark .article-clean-card img,
.theme-dark .article-image-preview img,
.theme-dark .admin-article-title-cell img {
  background: #0f172a;
  border-color: #23324a;
}

.theme-dark .info-highlight-box,
.theme-dark .contact-school-box {
  background: rgba(37, 99, 235, .14);
  border-color: rgba(147, 197, 253, .22);
}

.theme-dark .info-highlight-box > i,
.theme-dark .worksheet-builder-guide .guide-icon,
.theme-dark .dashboard-stat-card i,
.theme-dark .dashboard-list-icon,
.theme-dark .contact-admin-icon,
.theme-dark .contact-message-avatar,
.theme-dark .dashboard-action-card strong,
.theme-dark .leaderboard-empty i {
  background: rgba(96, 165, 250, .16);
  color: #bfdbfe;
}

.theme-dark .text-muted,
.theme-dark .small,
.theme-dark small,
.theme-dark .activity-list span,
.theme-dark .dashboard-panel-title p,
.theme-dark .dashboard-user-meta,
.theme-dark .admin-stat-card span,
.theme-dark .article-clean-head span,
.theme-dark .magazine-sidebar-card p,
.theme-dark .worksheet-builder-guide p,
.theme-dark .worksheet-builder-guide li,
.theme-dark .worksheet-builder-actions p,
.theme-dark .info-content-card p,
.theme-dark .info-feature-card p,
.theme-dark .info-split-panel p,
.theme-dark .info-highlight-box p,
.theme-dark .info-content-block p {
  color: #9fb0c8 !important;
}

/* Dark homepage refinement: fixes contrast issues visible on mobile home. */
.theme-dark .home-hero.pro-home-hero {
  background:
    linear-gradient(90deg, rgba(96, 165, 250, .055) 1px, transparent 1px),
    linear-gradient(180deg, #0b1220 0%, #0d1729 44%, #0a1322 100%);
  background-size: 34px 34px, auto;
}

.theme-dark .home-hero-copy.pro-hero-copy .hero-lead {
  color: #b7c5d9;
}

.theme-dark .home-hero.pro-home-hero .section-kicker {
  background: rgba(37, 99, 235, .2);
  border-color: rgba(147, 197, 253, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  color: #bfdbfe;
}

.theme-dark .home-hero.pro-home-hero .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  border-color: rgba(125, 211, 252, .35);
  color: #f8fafc;
}

.theme-dark .home-hero.pro-home-hero .btn-outline-primary,
.theme-dark .home-hero.pro-home-hero .btn-light {
  background: rgba(30, 58, 138, .2);
  border-color: rgba(96, 165, 250, .62);
  color: #f8fafc;
}

.theme-dark .home-metric-strip span {
  background: rgba(15, 23, 42, .9);
  border: 1px solid rgba(96, 165, 250, .2);
  box-shadow: 0 14px 34px rgba(2, 6, 23, .28);
  color: #cbd5e1;
}

.theme-dark .home-metric-strip strong {
  color: #93c5fd;
}

.theme-dark .home-metric-strip span:nth-child(1) {
  border-color: rgba(96, 165, 250, .34);
}

.theme-dark .home-metric-strip span:nth-child(2) {
  border-color: rgba(34, 197, 94, .34);
}

.theme-dark .home-metric-strip span:nth-child(3) {
  border-color: rgba(167, 139, 250, .38);
}

.theme-dark .home-metric-strip span:nth-child(2) strong {
  color: #4ade80;
}

.theme-dark .home-metric-strip span:nth-child(3) strong {
  color: #c4b5fd;
}

.theme-dark .hero-mini-card,
.theme-dark .pro-grade-card {
  background: rgba(15, 23, 42, .9);
  border-color: rgba(96, 165, 250, .2);
  color: #e5edf8;
}

.theme-dark .hero-mini-card p,
.theme-dark .pro-grade-card p {
  color: #a8b7cc;
}

/* Dark homepage feature cards: the section shown under the hero. */
.theme-dark .home-feature-band,
.theme-dark .pro-section-band,
.theme-dark .pro-steps-section,
.theme-dark .pro-grades-section {
  background: #0b1220;
}

.theme-dark .premium-feature-card,
.theme-dark .feature-card,
.theme-dark .pro-feature-card,
.theme-dark .pro-step-item {
  background: linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(12, 20, 35, .96));
  border: 1px solid rgba(96, 165, 250, .18);
  box-shadow: 0 18px 42px rgba(2, 6, 23, .34);
  color: #e5edf8;
}

.theme-dark .premium-feature-card h3,
.theme-dark .feature-card h3,
.theme-dark .pro-feature-card h3,
.theme-dark .pro-step-item h3 {
  color: #f8fafc;
}

.theme-dark .premium-feature-card p,
.theme-dark .feature-card p,
.theme-dark .pro-feature-card p,
.theme-dark .pro-step-item p {
  color: #b7c5d9;
}

.theme-dark .premium-feature-card::before,
.theme-dark .pro-feature-card::before,
.theme-dark .premium-feature-card::after {
  opacity: .95;
}

.theme-dark .premium-feature-card i,
.theme-dark .feature-card i,
.theme-dark .pro-feature-card i,
.theme-dark .pro-step-item i {
  background: rgba(96, 165, 250, .14);
  color: #bfdbfe;
}

.theme-dark .premium-feature-card.tone-yellow i,
.theme-dark .pro-feature-card.tone-yellow i {
  background: rgba(250, 204, 21, .15);
  color: #fde68a;
}

.theme-dark .premium-feature-card.tone-green i,
.theme-dark .pro-feature-card.tone-green i {
  background: rgba(34, 197, 94, .14);
  color: #86efac;
}

.theme-dark .premium-feature-card.tone-purple i,
.theme-dark .pro-feature-card.tone-purple i {
  background: rgba(139, 92, 246, .16);
  color: #c4b5fd;
}

.theme-dark .premium-feature-card.tone-pink i,
.theme-dark .pro-feature-card.tone-pink i {
  background: rgba(236, 72, 153, .15);
  color: #f9a8d4;
}

.theme-dark .premium-feature-card.tone-navy i,
.theme-dark .pro-feature-card.tone-navy i {
  background: rgba(148, 163, 184, .14);
  color: #cbd5e1;
}

/* Hard override for home feature cards after runtime theme switching. */
body.theme-dark .home-feature-band .premium-feature-grid .premium-feature-card,
body.theme-dark .home-feature-band .feature-grid .feature-card,
body.theme-dark .home-feature-band .pro-feature-grid .pro-feature-card,
body.theme-dark .pro-section-band .premium-feature-grid .premium-feature-card,
body.theme-dark .pro-section-band .feature-grid .feature-card,
body.theme-dark .pro-section-band .pro-feature-grid .pro-feature-card {
  background: linear-gradient(180deg, #111d31 0%, #0c1628 100%) !important;
  border-color: rgba(96, 165, 250, .26) !important;
  box-shadow: 0 18px 42px rgba(2, 6, 23, .4) !important;
  color: #e5edf8 !important;
}

body.theme-dark .home-feature-band .premium-feature-card h3,
body.theme-dark .home-feature-band .feature-card h3,
body.theme-dark .home-feature-band .pro-feature-card h3,
body.theme-dark .pro-section-band .premium-feature-card h3,
body.theme-dark .pro-section-band .feature-card h3,
body.theme-dark .pro-section-band .pro-feature-card h3 {
  color: #f8fafc !important;
}

body.theme-dark .home-feature-band .premium-feature-card p,
body.theme-dark .home-feature-band .feature-card p,
body.theme-dark .home-feature-band .pro-feature-card p,
body.theme-dark .pro-section-band .premium-feature-card p,
body.theme-dark .pro-section-band .feature-card p,
body.theme-dark .pro-section-band .pro-feature-card p {
  color: #b7c5d9 !important;
}

body.theme-dark .home-feature-band .premium-feature-card i,
body.theme-dark .home-feature-band .feature-card i,
body.theme-dark .home-feature-band .pro-feature-card i,
body.theme-dark .pro-section-band .premium-feature-card i,
body.theme-dark .pro-section-band .feature-card i,
body.theme-dark .pro-section-band .pro-feature-card i {
  background: rgba(96, 165, 250, .14) !important;
  color: #bfdbfe !important;
}

/* Dark theme polish for quiz selector and worksheet builder pages. */
body.theme-dark .selector-panel,
body.theme-dark .content-panel.selector-panel {
  background: linear-gradient(180deg, #111d31 0%, #0c1628 100%) !important;
  border-color: rgba(96, 165, 250, .26) !important;
  box-shadow: 0 22px 48px rgba(2, 6, 23, .42) !important;
  color: #e5edf8 !important;
}

body.theme-dark .selector-panel .form-label,
body.theme-dark .selector-panel label {
  color: #dbeafe !important;
}

body.theme-dark .selector-panel .form-control,
body.theme-dark .selector-panel .form-select {
  background-color: #0b1728 !important;
  border-color: rgba(96, 165, 250, .28) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.theme-dark .selector-panel .form-control:disabled,
body.theme-dark .selector-panel .form-select:disabled {
  background-color: #0a1322 !important;
  border-color: rgba(148, 163, 184, .22) !important;
  color: #93a4ba !important;
  opacity: 1;
}

body.theme-dark .selector-panel .form-control:focus,
body.theme-dark .selector-panel .form-select:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 .22rem rgba(96, 165, 250, .18) !important;
}

body.theme-dark .selector-actions {
  background: transparent !important;
}

body.theme-dark .selector-actions p,
body.theme-dark #selectorMessage {
  color: #b7c5d9 !important;
}

body.theme-dark .worksheet-builder-section,
body.theme-dark .worksheet-builder-hero {
  color: #e5edf8;
}

body.theme-dark .worksheet-builder-card,
body.theme-dark .worksheet-builder-guide {
  background: linear-gradient(180deg, #111d31 0%, #0c1628 100%) !important;
  border-color: rgba(96, 165, 250, .24) !important;
  box-shadow: 0 24px 56px rgba(2, 6, 23, .42) !important;
  color: #e5edf8 !important;
}

body.theme-dark .worksheet-form-head,
body.theme-dark .worksheet-section-title-row,
body.theme-dark .worksheet-builder-actions {
  border-color: rgba(96, 165, 250, .2) !important;
}

body.theme-dark .worksheet-form-head > i,
body.theme-dark .worksheet-builder-guide .guide-icon {
  background: rgba(96, 165, 250, .16) !important;
  color: #bfdbfe !important;
}

body.theme-dark .worksheet-builder-card h2,
body.theme-dark .worksheet-builder-guide h2,
body.theme-dark .worksheet-step-heading h3,
body.theme-dark .worksheet-section-title-row h3,
body.theme-dark .worksheet-type-section h3 {
  color: #f8fafc !important;
}

body.theme-dark .worksheet-builder-card .section-kicker,
body.theme-dark .worksheet-form-head .section-kicker,
body.theme-dark .worksheet-builder-hero .section-kicker {
  background: rgba(37, 99, 235, .2) !important;
  border-color: rgba(147, 197, 253, .28) !important;
  color: #bfdbfe !important;
}

body.theme-dark .worksheet-ready-strip,
body.theme-dark .worksheet-step-section,
body.theme-dark .worksheet-type-section,
body.theme-dark .worksheet-final-section,
body.theme-dark .worksheet-builder-actions {
  background: rgba(2, 6, 23, .28) !important;
  border-color: rgba(96, 165, 250, .2) !important;
  color: #e5edf8 !important;
}

body.theme-dark .worksheet-ready-strip span,
body.theme-dark .worksheet-step-heading p,
body.theme-dark .worksheet-section-title-row p,
body.theme-dark .worksheet-builder-guide p,
body.theme-dark .worksheet-builder-guide li,
body.theme-dark .worksheet-builder-actions p,
body.theme-dark .worksheet-type-copy small {
  color: #b7c5d9 !important;
}

body.theme-dark .worksheet-builder-card .form-label {
  color: #dbeafe !important;
}

body.theme-dark .worksheet-builder-card .form-control,
body.theme-dark .worksheet-builder-card .form-select,
body.theme-dark .worksheet-type-row .form-control {
  background-color: #0b1728 !important;
  border-color: rgba(96, 165, 250, .28) !important;
  color: #f8fafc !important;
}

body.theme-dark .worksheet-builder-card .form-control:disabled,
body.theme-dark .worksheet-builder-card .form-select:disabled {
  background-color: #0a1322 !important;
  border-color: rgba(148, 163, 184, .22) !important;
  color: #93a4ba !important;
  opacity: 1;
}

body.theme-dark .worksheet-type-table {
  background: transparent !important;
}

body.theme-dark .worksheet-type-table-head {
  color: #cbd5e1 !important;
}

body.theme-dark .worksheet-type-row {
  background: linear-gradient(180deg, rgba(15, 27, 46, .96), rgba(10, 19, 34, .96)) !important;
  border-color: rgba(96, 165, 250, .2) !important;
  color: #e5edf8 !important;
}

body.theme-dark .worksheet-type-row:hover,
body.theme-dark .worksheet-type-row.is-enabled {
  background: linear-gradient(180deg, rgba(23, 37, 62, .98), rgba(12, 25, 45, .98)) !important;
  border-color: rgba(96, 165, 250, .46) !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .16) !important;
}

body.theme-dark .worksheet-type-toggle {
  background: rgba(96, 165, 250, .14) !important;
}

body.theme-dark .worksheet-type-copy strong {
  color: #f8fafc !important;
}

body.theme-dark .worksheet-builder-actions {
  align-items: center;
}

/* Dark homepage leaderboard polish. */
body.theme-dark .leaderboard-section.pro-leaderboard-section {
  background:
    linear-gradient(90deg, rgba(96, 165, 250, .055) 1px, transparent 1px),
    linear-gradient(180deg, #0b1220 0%, #101b30 52%, #0b1220 100%) !important;
  background-size: 34px 34px, auto !important;
}

body.theme-dark .leaderboard-section.pro-leaderboard-section .section-kicker {
  background: rgba(37, 99, 235, .22) !important;
  border-color: rgba(147, 197, 253, .3) !important;
  color: #bfdbfe !important;
}

body.theme-dark .leaderboard-section.pro-leaderboard-section .section-heading h2 {
  color: #f8fafc !important;
}

body.theme-dark .leaderboard-section.pro-leaderboard-section .section-heading p {
  color: #dbeafe !important;
}

body.theme-dark .leaderboard-carousel.pro-leaderboard-carousel {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.theme-dark .grade-leaderboard.pro-leaderboard-slide {
  background: linear-gradient(180deg, rgba(17, 29, 49, .96), rgba(12, 22, 40, .96)) !important;
  border-color: rgba(96, 165, 250, .22) !important;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .38) !important;
  color: #e5edf8 !important;
}

body.theme-dark .leaderboard-slide-head span {
  color: #60a5fa !important;
}

body.theme-dark .grade-leaderboard.pro-leaderboard-slide h3,
body.theme-dark .leaderboard-empty strong,
body.theme-dark .leader-card strong {
  color: #f8fafc !important;
}

body.theme-dark .leaderboard-slide-head p,
body.theme-dark .leaderboard-empty p,
body.theme-dark .leader-card small {
  color: #b7c5d9 !important;
}

body.theme-dark .leaderboard-empty {
  background: linear-gradient(180deg, rgba(15, 27, 46, .98), rgba(10, 19, 34, .98)) !important;
  border-color: rgba(96, 165, 250, .3) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  color: #e5edf8 !important;
}

body.theme-dark .leaderboard-empty i {
  background: rgba(96, 165, 250, .14) !important;
  border-radius: 14px;
  color: #bfdbfe !important;
  padding: .55rem;
}

body.theme-dark .leader-card {
  background: linear-gradient(180deg, rgba(15, 27, 46, .98), rgba(10, 19, 34, .98)) !important;
  border-color: rgba(96, 165, 250, .26) !important;
  color: #e5edf8 !important;
}

body.theme-dark .leader-card.rank-1 {
  background: linear-gradient(180deg, rgba(120, 53, 15, .42), rgba(15, 27, 46, .98)) !important;
  border-color: rgba(250, 204, 21, .42) !important;
}

body.theme-dark .leader-avatar {
  background: #0b1220 !important;
  border-color: rgba(147, 197, 253, .24) !important;
}

body.theme-dark .leaderboard-carousel.pro-leaderboard-carousel .leaderboard-nav {
  background: #f8fafc !important;
  border-color: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 18px 40px rgba(2, 6, 23, .36) !important;
  color: #2563eb !important;
}

body.theme-dark .leaderboard-carousel.pro-leaderboard-carousel .leaderboard-nav:hover,
body.theme-dark .leaderboard-carousel.pro-leaderboard-carousel .leaderboard-nav:focus {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

/* Articles index polish. */
.articles-magazine-hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(37, 99, 235, .12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  padding-block: clamp(2rem, 5vw, 4rem);
}

.articles-magazine-hero .narrow-content {
  max-width: 820px;
}

.articles-magazine-hero h1 {
  color: #0f172a;
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  font-weight: 900;
  line-height: 1.25;
  margin: .75rem 0 1rem;
}

.articles-magazine-hero p {
  color: #475569;
  font-size: 1.12rem;
  line-height: 2;
  margin: 0 auto;
  max-width: 720px;
}

.articles-magazine-section {
  background: #f8fafc;
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.article-category-strip {
  align-items: center;
  display: flex;
  gap: .75rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding: .25rem .1rem .85rem;
  scrollbar-width: thin;
}

.article-category-chip {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  color: #1e293b;
  display: inline-flex;
  flex: 0 0 auto;
  gap: .45rem;
  min-height: 46px;
  padding: .65rem .9rem;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.article-category-chip i {
  color: var(--category-color, var(--eqp-primary));
}

.article-category-chip small {
  align-items: center;
  background: rgba(37, 99, 235, .1);
  border-radius: 999px;
  color: var(--category-color, var(--eqp-primary));
  display: inline-flex;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding-inline: .35rem;
}

.article-category-chip:hover,
.article-category-chip:focus,
.article-category-chip.is-active {
  border-color: rgba(37, 99, 235, .42);
  box-shadow: 0 16px 34px rgba(37, 99, 235, .12);
  color: #1d4ed8;
  transform: translateY(-2px);
}

.article-search-bar {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
  display: grid;
  gap: .8rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 0 0 1.25rem;
  padding: .7rem;
}

.article-search-bar > i {
  align-items: center;
  background: #eff6ff;
  border-radius: 8px;
  color: #2563eb;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.article-search-bar input {
  background: transparent;
  border: 0;
  color: #0f172a;
  font-size: 1rem;
  min-width: 0;
  outline: none;
  padding: .7rem .15rem;
}

.article-search-bar input::placeholder {
  color: #94a3b8;
}

.article-search-bar .btn {
  min-height: 46px;
  min-width: 92px;
}

.articles-magazine-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-clean-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .07);
  min-width: 0;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.article-clean-card:hover,
.article-clean-card:focus-within {
  border-color: rgba(37, 99, 235, .4);
  box-shadow: 0 24px 48px rgba(15, 23, 42, .12);
  transform: translateY(-4px);
}

.article-clean-card > a {
  color: inherit;
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100%;
  min-height: 100%;
  text-decoration: none;
}

.article-clean-head {
  display: grid;
  gap: .65rem;
  padding: 1rem 1rem .8rem;
}

.article-card-category {
  align-self: start;
  background: #eff6ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1;
  padding: .45rem .7rem;
  width: max-content;
}

.article-clean-head strong {
  color: #0f172a;
  display: -webkit-box;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.55;
  min-height: 3.45rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-clean-card img,
.article-list-placeholder {
  aspect-ratio: 16 / 9;
  background: #e0f2fe;
  display: block;
  height: auto;
  max-height: none;
  object-fit: cover;
  width: 100%;
}

.article-list-content {
  display: grid;
  gap: .85rem;
  padding: 1rem;
}

.article-list-content small {
  color: #475569;
  display: -webkit-box;
  font-size: .96rem;
  line-height: 1.85;
  min-height: 5.3rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-tags-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 28px;
}

.article-tags-line em {
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 999px;
  color: #475569;
  font-size: .82rem;
  font-style: normal;
  font-weight: 700;
  padding: .3rem .55rem;
}

.article-list-meta {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, .24);
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  padding-top: .85rem;
}

.article-list-meta span {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
}

.article-list-read {
  align-items: center;
  color: #2563eb;
  display: inline-flex;
  font-weight: 900;
  gap: .45rem;
  justify-self: start;
}

.article-clean-card:hover .article-list-read i,
.article-clean-card:focus-within .article-list-read i {
  transform: translateX(-4px);
}

.article-list-read i {
  transition: transform .18s ease;
}

.articles-load-more,
.articles-list + .btn,
[data-articles-load-more] {
  border-radius: 8px;
  min-height: 48px;
  padding-inline: 1.25rem;
}

body.theme-dark .articles-magazine-hero,
body.theme-dark .articles-magazine-section {
  background:
    linear-gradient(rgba(96, 165, 250, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, .045) 1px, transparent 1px),
    #0b1220 !important;
  background-size: 44px 44px !important;
  border-color: rgba(148, 163, 184, .16) !important;
}

body.theme-dark .articles-magazine-hero h1,
body.theme-dark .article-clean-head strong {
  color: #f8fafc !important;
}

body.theme-dark .articles-magazine-hero p,
body.theme-dark .article-list-content small,
body.theme-dark .article-list-meta {
  color: #b6c4d8 !important;
}

body.theme-dark .article-category-chip,
body.theme-dark .article-search-bar,
body.theme-dark .article-clean-card {
  background: rgba(15, 23, 42, .94) !important;
  border-color: rgba(148, 163, 184, .24) !important;
  box-shadow: 0 22px 54px rgba(2, 6, 23, .34) !important;
  color: #e2e8f0 !important;
}

body.theme-dark .article-category-chip:hover,
body.theme-dark .article-category-chip:focus,
body.theme-dark .article-category-chip.is-active,
body.theme-dark .article-clean-card:hover,
body.theme-dark .article-clean-card:focus-within {
  border-color: rgba(96, 165, 250, .52) !important;
}

body.theme-dark .article-search-bar > i,
body.theme-dark .article-card-category {
  background: rgba(37, 99, 235, .18) !important;
  color: #93c5fd !important;
}

body.theme-dark .article-search-bar input {
  color: #f8fafc !important;
}

body.theme-dark .article-tags-line em {
  background: rgba(30, 41, 59, .86) !important;
  border-color: rgba(148, 163, 184, .22) !important;
  color: #cbd5e1 !important;
}

body.theme-dark .article-list-meta {
  border-color: rgba(148, 163, 184, .2) !important;
}

body.theme-dark .article-list-read {
  color: #93c5fd !important;
}

body.theme-dark .article-clean-card img {
  opacity: .92;
}

@media (max-width: 1199.98px) {
  .articles-magazine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .articles-magazine-section {
    padding-block: 1.25rem 2rem;
  }

  .article-search-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .article-search-bar .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .articles-magazine-grid {
    grid-template-columns: 1fr;
  }

  .article-clean-head strong {
    min-height: 0;
  }

  .article-list-content small {
    min-height: 0;
  }
}

/* Worksheet builder and print polish - 2026-10-10 */
.worksheet-builder-card .btn[data-worksheet-submit] {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 210px;
}

.worksheet-builder-card .btn[data-worksheet-submit].is-loading {
  opacity: .86;
  pointer-events: none;
}

.worksheet-print-shell {
  background:
    radial-gradient(circle at 12% 8%, rgba(59, 130, 246, .18), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(20, 184, 166, .16), transparent 26%),
    linear-gradient(180deg, #eaf4ff 0%, #f8fbff 100%) !important;
  padding: 2rem 1rem !important;
}

.worksheet-page {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, .95), rgba(255, 255, 255, .98) 38%, rgba(240, 253, 250, .92)),
    #fff !important;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18) !important;
  overflow: hidden !important;
  padding: 1.05rem 1.05rem .9rem !important;
}

.worksheet-page::after {
  background:
    linear-gradient(90deg, #2563eb, #14b8a6 48%, #facc15);
  content: "";
  height: 8px;
  inset: 0 0 auto 0;
  position: absolute;
}

.worksheet-page-header.is-simple {
  background:
    radial-gradient(circle at 10% 18%, rgba(250, 204, 21, .24), transparent 26%),
    linear-gradient(135deg, #1d4ed8, #0f766e) !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .22);
  color: #fff;
  margin-top: .35rem;
  padding: 1.05rem 1.2rem !important;
  position: relative;
}

.worksheet-page-header.is-simple::before,
.worksheet-page-header.is-simple::after {
  align-items: center;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 18px;
  color: #fff;
  content: "★";
  display: flex;
  font-size: 1.4rem;
  height: 48px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
}

.worksheet-page-header.is-simple::before {
  right: 1rem;
}

.worksheet-page-header.is-simple::after {
  left: 1rem;
}

.worksheet-title-box h1 {
  color: #fff !important;
  font-size: 1.65rem !important;
  margin: 0 3.5rem .3rem !important;
}

.worksheet-title-box p {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #e0f2fe !important;
  display: inline-flex;
  font-size: .92rem;
  font-weight: 900;
  padding: .25rem .8rem;
}

.worksheet-student-row.is-simple {
  gap: .75rem !important;
  grid-template-columns: minmax(0, 1fr) 150px !important;
  margin: .85rem 0 .9rem !important;
}

.worksheet-student-row > div {
  background: rgba(255, 255, 255, .92) !important;
  border: 1px solid rgba(59, 130, 246, .18) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
}

.worksheet-score-box strong {
  color: #1d4ed8;
}

.worksheet-questions {
  gap: .62rem !important;
}

.worksheet-question {
  background: rgba(255, 255, 255, .96) !important;
  border: 1px solid rgba(59, 130, 246, .14) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
  gap: .7rem !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  padding: .68rem .72rem !important;
}

.worksheet-question-marker {
  background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
  border: 3px solid #dbeafe;
  border-radius: 50% !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
  height: 40px !important;
  width: 40px !important;
}

.worksheet-question-title-row {
  align-items: center !important;
  border-bottom: 1px dashed rgba(148, 163, 184, .35);
  margin-bottom: .45rem !important;
  padding-bottom: .35rem;
}

.worksheet-question-title-row h3 {
  color: #0f172a !important;
  font-size: 1rem !important;
  line-height: 1.65 !important;
}

.worksheet-question-title-row strong {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #c2410c !important;
  padding: .18rem .58rem;
}

.worksheet-choice-list {
  gap: .58rem !important;
}

.worksheet-choice-item {
  background: linear-gradient(180deg, rgba(248, 250, 252, .85), rgba(255, 255, 255, .9));
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 13px;
  gap: .35rem !important;
  padding: .48rem .55rem;
}

.worksheet-choice-question {
  align-items: flex-start !important;
}

.worksheet-inner-number {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8 !important;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 950;
  justify-content: center;
  min-width: 28px;
  padding: .08rem .42rem;
}

.worksheet-choice-question p,
.worksheet-true-false-line p,
.worksheet-answer-option p {
  color: #172033 !important;
  font-weight: 850 !important;
}

.worksheet-answers-grid {
  gap: .25rem .75rem !important;
}

.worksheet-answer-option {
  min-height: 28px !important;
}

.worksheet-choice-dot::before {
  background: #14b8a6 !important;
}

.worksheet-word-bank {
  gap: .4rem !important;
}

.worksheet-word-bank span,
.worksheet-matching span {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  border-radius: 999px !important;
  color: #0f172a !important;
  min-height: 32px !important;
  padding: .28rem .7rem !important;
}

.worksheet-line {
  border-bottom: 2px dotted #60a5fa !important;
  color: #64748b !important;
  min-height: 36px !important;
}

.worksheet-matching {
  gap: .5rem 1rem !important;
}

.worksheet-matching > div {
  background: rgba(248, 250, 252, .82);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 14px;
  padding: .45rem;
}

.worksheet-true-false-line {
  background: rgba(248, 250, 252, .75);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  padding: .35rem .45rem;
}

.worksheet-footer {
  background: linear-gradient(90deg, rgba(239, 246, 255, .95), rgba(240, 253, 250, .95));
  border: 1px solid rgba(59, 130, 246, .16) !important;
  border-radius: 14px;
  margin-top: auto !important;
  padding: .55rem .65rem !important;
}

.worksheet-print-toolbar {
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

@media (max-width: 640px) {
  .worksheet-page {
    border-radius: 14px !important;
    min-height: auto !important;
    padding: .8rem !important;
  }

  .worksheet-page-header.is-simple::before,
  .worksheet-page-header.is-simple::after {
    display: none;
  }

  .worksheet-title-box h1 {
    font-size: 1.25rem !important;
    margin-inline: 0 !important;
  }

  .worksheet-student-row.is-simple {
    grid-template-columns: 1fr !important;
  }

  .worksheet-question {
    grid-template-columns: 34px minmax(0, 1fr) !important;
  }

  .worksheet-question-marker {
    height: 34px !important;
    width: 34px !important;
  }
}

@media print {
  .worksheet-print-shell {
    background: #fff !important;
    padding: 0 !important;
  }

  .worksheet-page {
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .worksheet-question,
  .worksheet-choice-item,
  .worksheet-footer,
  .worksheet-student-row > div {
    box-shadow: none !important;
  }
}

/* Reference-style worksheet output - colorful printable sheet */
.worksheet-page-header.is-reference {
  align-items: center;
  background:
    radial-gradient(circle at 7% 18%, rgba(255, 255, 255, .9), transparent 12%),
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, .92), transparent 13%),
    linear-gradient(180deg, #b7e9ff 0%, #eaf8ff 58%, #fff 100%) !important;
  border: 0 !important;
  border-radius: 20px 20px 28px 28px !important;
  display: grid !important;
  gap: .8rem;
  grid-template-columns: 1fr 1.35fr 1fr !important;
  margin: .15rem 0 .75rem;
  min-height: 122px;
  overflow: hidden;
  padding: .8rem 1rem 1rem !important;
  position: relative;
}

.worksheet-page-header.is-reference::before {
  background: linear-gradient(90deg, #38bdf8, #facc15, #38bdf8);
  border-radius: 50% 50% 0 0;
  bottom: -28px;
  content: "";
  height: 58px;
  left: -4%;
  opacity: .95;
  position: absolute;
  right: -4%;
}

.worksheet-page-header.is-reference::after {
  background:
    radial-gradient(circle, #2563eb 0 3px, transparent 4px),
    radial-gradient(circle, #f97316 0 4px, transparent 5px),
    radial-gradient(circle, #22c55e 0 3px, transparent 4px);
  background-position: 8% 42%, 92% 48%, 18% 75%;
  background-repeat: no-repeat;
  background-size: 30px 30px, 34px 34px, 24px 24px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.worksheet-meta-card {
  align-self: start;
  background: rgba(255, 255, 255, .92);
  border: 2px solid #1684df;
  border-radius: 22px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .14);
  color: #0f3676;
  min-height: 64px;
  padding: .45rem .75rem;
  position: relative;
  text-align: center;
  z-index: 1;
}

.worksheet-meta-card strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.35;
}

.worksheet-meta-card span {
  border-top: 2px dotted rgba(37, 99, 235, .45);
  display: block;
  font-size: .86rem;
  font-weight: 900;
  margin-top: .24rem;
  padding-top: .2rem;
}

.worksheet-page-header.is-reference .worksheet-title-box {
  position: relative;
  text-align: center;
  z-index: 1;
}

.worksheet-page-header.is-reference .worksheet-title-box span {
  color: #073b82 !important;
  display: block;
  font-size: 2.25rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(255, 255, 255, .85);
}

.worksheet-page-header.is-reference .worksheet-title-box h1 {
  background: linear-gradient(180deg, #ffe681, #f8c244);
  border-radius: 999px;
  box-shadow: 0 8px 0 rgba(245, 158, 11, .22);
  color: #8a2609 !important;
  display: inline-flex;
  font-size: 1.45rem !important;
  font-weight: 950;
  justify-content: center;
  line-height: 1.25;
  margin: .35rem auto 0 !important;
  max-width: 100%;
  padding: .28rem 1.2rem .42rem;
}

.worksheet-student-row.is-reference {
  align-items: center;
  display: grid;
  gap: .8rem;
  grid-template-columns: minmax(0, 1fr) 185px;
  margin: .25rem 0 .75rem !important;
}

.worksheet-student-row.is-reference > div {
  min-height: 46px !important;
}

.worksheet-student-row.is-reference .worksheet-student-name-field {
  border-color: rgba(59, 130, 246, .35) !important;
}

.worksheet-student-row.is-reference .worksheet-score-box {
  background: #fff0f7 !important;
  border: 2px solid #f472b6 !important;
  color: #be185d;
  display: flex !important;
  justify-content: center;
  padding: .45rem .7rem !important;
}

.worksheet-student-row.is-reference .worksheet-score-box strong {
  color: #be185d !important;
  min-height: auto;
}

.worksheet-section-block {
  border-width: 2px !important;
  overflow: hidden;
  padding: .55rem .65rem .65rem !important;
  position: relative;
}

.worksheet-section-block .worksheet-question-title-row {
  border: 0;
  border-radius: 999px;
  margin: 0 0 .55rem !important;
  padding: .35rem .75rem !important;
}

.worksheet-section-block .worksheet-question-title-row h3 {
  font-size: 1.08rem !important;
  font-weight: 950;
}

.worksheet-section-block .worksheet-question-marker {
  border: 3px solid #fff;
  box-shadow: 0 3px 0 rgba(15, 23, 42, .12), 0 0 0 3px currentColor;
}

.worksheet-section-block.style-pink {
  background: linear-gradient(180deg, #fff1f7, #fffafd) !important;
  border-color: #f43f8a !important;
}

.worksheet-section-block.style-pink .worksheet-question-title-row {
  background: linear-gradient(90deg, #ffd8ea, #fff4f9);
}

.worksheet-section-block.style-pink .worksheet-question-marker {
  background: linear-gradient(135deg, #ec4899, #f43f5e) !important;
  color: #ec4899;
}

.worksheet-section-block.style-blue {
  background: linear-gradient(180deg, #eff9ff, #ffffff) !important;
  border-color: #38bdf8 !important;
}

.worksheet-section-block.style-blue .worksheet-question-title-row {
  background: linear-gradient(90deg, #dff5ff, #f2fbff);
}

.worksheet-section-block.style-blue .worksheet-question-marker {
  background: linear-gradient(135deg, #0ea5e9, #2563eb) !important;
  color: #0ea5e9;
}

.worksheet-section-block.style-orange {
  background: linear-gradient(180deg, #fff8e8, #fffdf8) !important;
  border-color: #f59e0b !important;
}

.worksheet-section-block.style-orange .worksheet-question-title-row {
  background: linear-gradient(90deg, #ffe8b5, #fff8e8);
}

.worksheet-section-block.style-orange .worksheet-question-marker {
  background: linear-gradient(135deg, #f97316, #d97706) !important;
  color: #f97316;
}

.worksheet-section-block.style-purple {
  background: linear-gradient(180deg, #f5edff, #fffaff) !important;
  border-color: #a855f7 !important;
}

.worksheet-section-block.style-purple .worksheet-question-title-row {
  background: linear-gradient(90deg, #eadcff, #fbf5ff);
}

.worksheet-section-block.style-purple .worksheet-question-marker {
  background: linear-gradient(135deg, #8b5cf6, #a855f7) !important;
  color: #8b5cf6;
}

.worksheet-section-block.style-green {
  background: linear-gradient(180deg, #ecfdf5, #ffffff) !important;
  border-color: #22c55e !important;
}

.worksheet-section-block.style-green .worksheet-question-title-row {
  background: linear-gradient(90deg, #dcfce7, #f0fdf4);
}

.worksheet-section-block.style-green .worksheet-question-marker {
  background: linear-gradient(135deg, #22c55e, #14b8a6) !important;
  color: #22c55e;
}

.worksheet-page .worksheet-choice-item {
  background: rgba(255, 255, 255, .68);
}

.worksheet-page .worksheet-answer-option,
.worksheet-page .worksheet-true-false-line,
.worksheet-page .worksheet-matching > div,
.worksheet-page .worksheet-word-bank span {
  background: rgba(255, 255, 255, .82) !important;
}

.worksheet-footer {
  background:
    linear-gradient(90deg, #38bdf8, #7dd3fc 30%, #fde68a 68%, #38bdf8) !important;
  color: #0f3676 !important;
}

@media (max-width: 640px) {
  .worksheet-page-header.is-reference {
    grid-template-columns: 1fr !important;
  }

  .worksheet-meta-card {
    min-height: 0;
  }

  .worksheet-page-header.is-reference .worksheet-title-box span {
    font-size: 1.65rem;
  }

  .worksheet-page-header.is-reference .worksheet-title-box h1 {
    font-size: 1.15rem !important;
  }

  .worksheet-student-row.is-reference {
    grid-template-columns: 1fr;
  }
}

@media print {
  .worksheet-page-header.is-reference {
    border-radius: 14px 14px 22px 22px !important;
  }

  .worksheet-section-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
