/* Isolated premium exam system. No global layout or sidebar overrides. */
.mrph-exam-app {
  --exam-ink: #10263a;
  --exam-muted: #667d90;
  --exam-line: rgba(17, 91, 111, .14);
  --exam-cyan: #28c6d5;
  --exam-teal: #087582;
  --exam-navy: #041927;
  width: 100%;
}

.mrph-exam-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 1px solid var(--exam-line);
  border-radius: 24px;
  background: rgba(255,255,255,.72);
}

.mrph-exam-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(40,198,213,.15);
  border-top-color: var(--exam-cyan);
  animation: mrphExamSpin .8s linear infinite;
}

@keyframes mrphExamSpin { to { transform: rotate(360deg); } }

.mrph-exam-catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.mrph-exam-catalog-head small,
.mrph-exam-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--exam-teal);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.mrph-exam-catalog-head h3,
.mrph-exam-title {
  margin: 0;
  color: var(--exam-ink);
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -.035em;
}

[dir="rtl"] .mrph-exam-catalog-head h3,
[dir="rtl"] .mrph-exam-title { letter-spacing: -.015em; }

.mrph-exam-catalog-head p,
.mrph-exam-subtitle {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--exam-muted);
  line-height: 1.75;
}

.mrph-exam-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mrph-exam-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(105,223,232,.19);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(49,205,221,.25), transparent 15rem),
    linear-gradient(145deg, #041724, #07334a 62%, #0a7681);
  box-shadow: 0 24px 60px rgba(4,30,47,.16);
  isolation: isolate;
}

.mrph-exam-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg,#000,transparent);
}

.mrph-exam-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.mrph-exam-card-badge,
.mrph-exam-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(181,239,243,.17);
  border-radius: 999px;
  color: #c9f3f6;
  background: rgba(49,205,221,.09);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mrph-exam-card h4 {
  max-width: 620px;
  margin: 34px 0 12px;
  color: #fff;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: -.035em;
}

[dir="rtl"] .mrph-exam-card h4 { letter-spacing: -.015em; line-height: 1.25; }

.mrph-exam-card p {
  max-width: 660px;
  margin: 0;
  color: rgba(223,243,246,.78);
  font-size: 14px;
  line-height: 1.72;
}

.mrph-exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 25px 0;
}

.mrph-exam-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  color: rgba(238,249,250,.88);
  background: rgba(255,255,255,.055);
  font-size: 11px;
  font-weight: 750;
}

.mrph-exam-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
}

.mrph-exam-primary,
.mrph-exam-secondary,
.mrph-exam-icon-button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}

.mrph-exam-primary {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  color: #04202a;
  background: linear-gradient(135deg, #72edf1, #33cbd5);
  box-shadow: 0 12px 28px rgba(49,205,221,.23);
}

.mrph-exam-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
.mrph-exam-primary:disabled { opacity: .48; cursor: not-allowed; transform: none; }

.mrph-exam-secondary {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--exam-line);
  border-radius: 12px;
  color: var(--exam-ink);
  background: #fff;
}

.mrph-exam-attempt-note {
  color: rgba(230,247,249,.72);
  font-size: 11px;
}

.mrph-exam-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
}

.mrph-exam-main,
.mrph-exam-side,
.mrph-exam-result {
  border: 1px solid var(--exam-line);
  border-radius: 24px;
  background: rgba(255,255,255,.90);
  box-shadow: 0 22px 58px rgba(7,48,66,.09);
}

.mrph-exam-main { overflow: hidden; }

.mrph-exam-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--exam-line);
  background: linear-gradient(110deg, rgba(4,25,39,.98), rgba(7,80,97,.96));
  color: #fff;
}

.mrph-exam-progress-copy strong { display: block; font-size: 13px; }
.mrph-exam-progress-copy small { color: rgba(222,243,246,.68); }

.mrph-exam-timer {
  min-width: 104px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 13px;
  background: rgba(255,255,255,.07);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .04em;
}

.mrph-exam-progress-track {
  height: 4px;
  background: rgba(30,112,131,.09);
}

.mrph-exam-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--exam-cyan), #74e7e6);
  transition: width .22s ease;
}

.mrph-exam-question {
  min-height: 500px;
  padding: clamp(24px, 4vw, 44px);
}

.mrph-exam-question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  margin-bottom: 20px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--exam-teal);
  background: rgba(40,198,213,.09);
  font-size: 11px;
  font-weight: 900;
}

.mrph-exam-question h3 {
  margin: 0 0 28px;
  color: var(--exam-ink);
  font-size: clamp(20px, 2.25vw, 29px);
  font-weight: 800;
  line-height: 1.48;
}

.mrph-exam-options { display: grid; gap: 11px; }

.mrph-exam-option {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(19,91,111,.13);
  border-radius: 15px;
  color: var(--exam-ink);
  background: rgba(249,252,253,.96);
  cursor: pointer;
  text-align: start;
  font: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.mrph-exam-option:hover {
  transform: translateY(-1px);
  border-color: rgba(40,198,213,.44);
  box-shadow: 0 8px 22px rgba(18,102,119,.07);
}

.mrph-exam-option.selected {
  border-color: rgba(40,198,213,.70);
  background: linear-gradient(135deg, rgba(40,198,213,.13), rgba(255,255,255,.98));
  box-shadow: 0 0 0 3px rgba(40,198,213,.08);
}

.mrph-exam-option b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--exam-teal);
  background: rgba(40,198,213,.10);
}

.mrph-exam-question-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.mrph-exam-nav-actions { display: flex; gap: 8px; }

.mrph-exam-side {
  position: sticky;
  top: 104px;
  align-self: start;
  overflow: hidden;
}

.mrph-exam-side-head {
  padding: 20px;
  color: #fff;
  background: linear-gradient(145deg, #041a28, #07576b);
}

.mrph-exam-side-head strong { display: block; font-size: 16px; }
.mrph-exam-side-head small { color: rgba(220,244,246,.70); }

.mrph-exam-legend {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
  padding: 14px 16px 0;
  color: var(--exam-muted);
  font-size: 10px;
}

.mrph-exam-legend span { display: flex; align-items: center; gap: 6px; }
.mrph-exam-legend i { width: 8px; height: 8px; border-radius: 50%; background: #dce7ec; }
.mrph-exam-legend .answered i { background: var(--exam-cyan); }
.mrph-exam-legend .marked i { background: #f0af48; }

.mrph-exam-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  max-height: 330px;
  overflow: auto;
  padding: 16px;
}

.mrph-exam-palette button {
  aspect-ratio: 1;
  border: 1px solid rgba(20,91,111,.12);
  border-radius: 10px;
  color: var(--exam-muted);
  background: #f8fbfc;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.mrph-exam-palette button.answered { color: #075969; background: rgba(40,198,213,.15); border-color: rgba(40,198,213,.34); }
.mrph-exam-palette button.marked { box-shadow: inset 0 -3px 0 #f0af48; }
.mrph-exam-palette button.current { color: #fff; background: var(--exam-teal); border-color: var(--exam-teal); }

.mrph-exam-side-foot { padding: 0 16px 16px; }
.mrph-exam-side-foot .mrph-exam-primary { width: 100%; }

.mrph-exam-result { overflow: hidden; }

.mrph-exam-result-hero {
  display: grid;
  grid-template-columns: 180px minmax(0,1fr);
  gap: 28px;
  align-items: center;
  padding: 36px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 15%, rgba(49,205,221,.26), transparent 17rem),
    linear-gradient(140deg,#041826,#075267);
}

.mrph-exam-score-ring {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--exam-cyan) var(--score), rgba(255,255,255,.10) 0);
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}

.mrph-exam-score-ring::before {
  content: "";
  grid-area: 1/1;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #082a3b;
}

.mrph-exam-score-ring strong,
.mrph-exam-score-ring small { grid-area: 1/1; z-index: 1; }
.mrph-exam-score-ring strong { margin-top: -12px; font-size: 34px; }
.mrph-exam-score-ring small { margin-top: 38px; color: rgba(221,243,246,.68); }

.mrph-exam-result-copy h3 { margin: 8px 0 10px; color: #fff; font-size: clamp(28px,4vw,46px); }
.mrph-exam-result-copy p { margin: 0; color: rgba(224,244,247,.76); line-height: 1.7; }

.mrph-exam-result-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  margin-top: 22px;
}

.mrph-exam-result-stats div {
  padding: 13px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 13px;
  background: rgba(255,255,255,.06);
}
.mrph-exam-result-stats b { display: block; font-size: 20px; }
.mrph-exam-result-stats span { color: rgba(224,244,247,.68); font-size: 10px; }

.mrph-exam-review { padding: 26px; }
.mrph-exam-review-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.mrph-exam-review-list { display: grid; gap: 10px; }

.mrph-exam-review-item {
  padding: 16px;
  border: 1px solid var(--exam-line);
  border-radius: 15px;
  background: #fbfdfe;
}
.mrph-exam-review-item.correct { border-inline-start: 4px solid #30b995; }
.mrph-exam-review-item.incorrect { border-inline-start: 4px solid #e2676f; }
.mrph-exam-review-item h4 { margin: 0 0 9px; color: var(--exam-ink); line-height: 1.5; }
.mrph-exam-review-item p { margin: 4px 0; color: var(--exam-muted); font-size: 12px; }
.mrph-exam-review-item b { color: var(--exam-ink); }

.mrph-exam-empty {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 1px dashed rgba(20,117,130,.20);
  border-radius: 22px;
  color: var(--exam-muted);
  background: rgba(255,255,255,.62);
  text-align: center;
}

@media (max-width: 1000px) {
  .mrph-exam-grid { grid-template-columns: 1fr; }
  .mrph-exam-shell { grid-template-columns: 1fr; }
  .mrph-exam-side { position: static; }
  .mrph-exam-palette { grid-template-columns: repeat(10, 1fr); max-height: none; }
}

@media (max-width: 700px) {
  .mrph-exam-card { padding: 22px; border-radius: 21px; }
  .mrph-exam-catalog-head { display: block; }
  .mrph-exam-question { padding: 22px 18px; }
  .mrph-exam-question-foot { align-items: stretch; flex-direction: column; }
  .mrph-exam-nav-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mrph-exam-result-hero { grid-template-columns: 1fr; padding: 28px 20px; text-align: center; }
  .mrph-exam-score-ring { margin: 0 auto; }
  .mrph-exam-result-stats { grid-template-columns: 1fr; }
  .mrph-exam-palette { grid-template-columns: repeat(5, 1fr); }
}
