:root {
  --aep-navy: #061b3f;
  --aep-deep: #041529;
  --aep-teal: #0f8391;
  --aep-cyan: #39d5e8;
  --aep-gold: #c9a45f;
  --aep-ink: #12263b;
  --aep-muted: #6c7e8f;
  --aep-line: rgba(12, 72, 92, .13);
  --aep-surface: rgba(255, 255, 255, .92);
}

.mrph-aep-nav .nav-icon {
  color: #61e0ec;
  font-size: 12px;
  letter-spacing: -.08em;
}

.mrph-aep-nav::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-inline-start: auto;
  background: linear-gradient(135deg, #d9bd7a, #7ce8ee);
  box-shadow: 0 0 14px rgba(100, 226, 235, .52);
}

.mrph-aep-page {
  position: relative;
  display: grid;
  gap: 22px;
  padding-bottom: 34px;
  color: var(--aep-ink);
}

.mrph-aep-page::before {
  content: '';
  position: absolute;
  inset: -18px -18px auto;
  height: 440px;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 8%, rgba(42, 195, 207, .17), transparent 32%),
    radial-gradient(circle at 18% 22%, rgba(201, 164, 95, .10), transparent 30%);
  filter: blur(1px);
}

.mrph-aep-page > * {
  position: relative;
  z-index: 1;
}

.aep-hero {
  position: relative;
  overflow: hidden;
  min-height: 355px;
  padding: clamp(28px, 4vw, 50px);
  border: 1px solid rgba(110, 229, 237, .18);
  border-radius: 31px;
  background:
    linear-gradient(126deg, rgba(2, 20, 43, .98) 0%, rgba(5, 43, 68, .98) 58%, rgba(9, 126, 139, .94) 100%);
  box-shadow: 0 28px 70px rgba(2, 26, 48, .20);
  color: #fff;
}

.aep-hero::before,
.aep-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.aep-hero::before {
  width: 450px;
  height: 450px;
  inset: -230px -70px auto auto;
  border: 1px solid rgba(115, 232, 239, .25);
  box-shadow: 0 0 0 64px rgba(86, 212, 222, .045), 0 0 0 128px rgba(86, 212, 222, .025);
}

.aep-hero::after {
  width: 260px;
  height: 260px;
  left: -95px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(207, 170, 95, .22), transparent 67%);
}

.aep-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: 36px;
  align-items: stretch;
}

.aep-kicker,
.aep-section-kicker,
.aep-certificate-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.aep-kicker {
  padding: 10px 15px;
  border: 1px solid rgba(116, 229, 237, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #a8f2f6;
}

.aep-kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d7b96d;
  box-shadow: 0 0 15px rgba(215, 185, 109, .62);
}

.aep-hero h2 {
  max-width: 780px;
  margin: 27px 0 12px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: .99;
  letter-spacing: -.055em;
}

.aep-hero h2 span {
  display: block;
  margin-top: 10px;
  color: #74e6ee;
  font-size: .42em;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.aep-hero-copy > p {
  max-width: 730px;
  margin: 0;
  color: rgba(226, 242, 247, .78);
  font-size: 16px;
  line-height: 1.9;
}

.aep-person-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .10);
}

.aep-person-line strong {
  font-size: 17px;
}

.aep-person-line span {
  color: rgba(230, 245, 248, .58);
  font-size: 13px;
}

.aep-readiness-card {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 268px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 25px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13);
  text-align: center;
  backdrop-filter: blur(12px);
}

.aep-readiness-ring {
  --aep-score: 0%;
  position: relative;
  display: grid;
  place-items: center;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background: conic-gradient(#59dce6 var(--aep-score), rgba(255, 255, 255, .11) 0);
  box-shadow: 0 20px 45px rgba(0, 15, 31, .22);
}

.aep-readiness-ring::before {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: linear-gradient(145deg, #072b45, #0c5968);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.aep-readiness-ring b,
.aep-readiness-ring small {
  position: relative;
  z-index: 1;
}

.aep-readiness-ring b {
  font-size: 42px;
  letter-spacing: -.06em;
}

.aep-readiness-ring small {
  margin-top: -32px;
  color: #9cecf1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.aep-readiness-card > strong {
  margin-top: 17px;
  font-size: 16px;
}

.aep-readiness-card > span {
  margin-top: 6px;
  color: rgba(231, 248, 250, .62);
  font-size: 12px;
}

.aep-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.aep-summary-card,
.aep-panel,
.aep-mastery-card,
.aep-error-card,
.aep-certificate-panel {
  border: 1px solid var(--aep-line);
  background: var(--aep-surface);
  box-shadow: 0 17px 45px rgba(12, 45, 65, .075);
}

.aep-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 145px;
  padding: 22px;
  border-radius: 21px;
}

.aep-summary-card::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  right: -40px;
  top: -48px;
  border-radius: 50%;
  background: rgba(46, 194, 206, .09);
}

.aep-summary-card i {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(11, 112, 129, .12), rgba(43, 207, 216, .07));
  color: #0b7f8d;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.aep-summary-card b {
  display: block;
  margin-top: 17px;
  color: #082941;
  font-size: 30px;
  letter-spacing: -.045em;
}

.aep-summary-card span {
  display: block;
  margin-top: 4px;
  color: var(--aep-muted);
  font-size: 12px;
  font-weight: 650;
}

.aep-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 18px;
}

.aep-panel {
  overflow: hidden;
  border-radius: 24px;
}

.aep-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 23px 24px 18px;
  border-bottom: 1px solid rgba(10, 80, 99, .09);
}

.aep-section-kicker {
  color: #0d8794;
  font-size: 9px;
}

.aep-panel-head h3 {
  margin: 7px 0 0;
  color: #0b2940;
  font-size: 22px;
  letter-spacing: -.03em;
}

.aep-panel-head p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--aep-muted);
  font-size: 13px;
  line-height: 1.65;
}

.aep-panel-body {
  padding: 22px 24px 25px;
}

.aep-performance-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 23px;
}

.aep-performance-stats > div {
  padding: 15px;
  border: 1px solid rgba(10, 83, 100, .09);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(241, 249, 250, .95), #fff);
}

.aep-performance-stats b,
.aep-performance-stats span {
  display: block;
}

.aep-performance-stats b {
  color: #0b344b;
  font-size: 21px;
}

.aep-performance-stats span {
  margin-top: 5px;
  color: var(--aep-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.aep-trend {
  min-height: 205px;
  padding: 16px 10px 2px;
  border-radius: 17px;
  background:
    linear-gradient(rgba(9, 102, 119, .06) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(9, 102, 119, .04) 1px, transparent 1px) 0 0 / 12.5% 100%,
    rgba(246, 251, 252, .76);
}

.aep-trend svg {
  display: block;
  width: 100%;
  height: 180px;
  overflow: visible;
}

.aep-trend polyline {
  fill: none;
  stroke: #1198a6;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 8px rgba(10, 131, 146, .18));
}

.aep-trend circle {
  fill: #fff;
  stroke: #0f8998;
  stroke-width: 3;
}

.aep-study-list {
  display: grid;
  gap: 10px;
}

.aep-study-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(9, 80, 98, .08);
  border-radius: 16px;
  background: rgba(247, 251, 252, .76);
}

.aep-study-row i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #e8f7f8;
  color: #0c8492;
  font-style: normal;
  font-weight: 900;
}

.aep-study-row strong,
.aep-study-row small {
  display: block;
}

.aep-study-row strong {
  font-size: 13px;
}

.aep-study-row small,
.aep-study-row time {
  color: var(--aep-muted);
  font-size: 10px;
}

.aep-mastery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.aep-mastery-card {
  padding: 20px;
  border-radius: 20px;
}

.aep-mastery-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.aep-mastery-top h4 {
  margin: 0;
  color: #0b2c43;
  font-size: 16px;
  line-height: 1.35;
}

.aep-mastery-top span {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  background: #e9f8f9;
  color: #087d8b;
  font-size: 10px;
  font-weight: 800;
}

.aep-meter {
  height: 8px;
  margin: 20px 0 15px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8f0f2;
}

.aep-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0e7788, #45d5de);
}

.aep-mastery-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.aep-mastery-meta div {
  min-width: 0;
}

.aep-mastery-meta b,
.aep-mastery-meta small {
  display: block;
}

.aep-mastery-meta b {
  color: #14384e;
  font-size: 14px;
}

.aep-mastery-meta small {
  margin-top: 3px;
  color: var(--aep-muted);
  font-size: 9px;
}

.aep-error-list {
  display: grid;
  gap: 11px;
}

.aep-error-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 17px;
  border-radius: 18px;
}

.aep-error-index {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 13px;
  background: #fff3ee;
  color: #b65835;
  font-weight: 900;
}

.aep-error-copy h4 {
  margin: 0;
  color: #17364a;
  font-size: 13px;
  line-height: 1.62;
}

.aep-error-copy p {
  margin: 6px 0 0;
  color: var(--aep-muted);
  font-size: 10px;
}

.aep-error-count {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff1ec;
  color: #a84f31;
  font-size: 10px;
  font-weight: 800;
}

.aep-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aep-achievement {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid rgba(15, 119, 133, .12);
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f1fafb);
}

.aep-achievement i {
  color: #b28b43;
  font-style: normal;
}

.aep-achievement strong,
.aep-achievement small {
  display: block;
}

.aep-achievement strong {
  color: #15364b;
  font-size: 12px;
}

.aep-achievement small {
  margin-top: 2px;
  color: var(--aep-muted);
  font-size: 9px;
}

.aep-attempt-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(8, 81, 100, .09);
}

.aep-attempt-table {
  width: 100%;
  min-width: 670px;
  border-collapse: collapse;
  background: #fff;
}

.aep-attempt-table th,
.aep-attempt-table td {
  padding: 13px 15px;
  border-bottom: 1px solid rgba(10, 82, 101, .07);
  text-align: start;
  font-size: 11px;
}

.aep-attempt-table th {
  color: #6d7f8f;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #f5fafb;
}

.aep-attempt-table td:first-child {
  color: #15364b;
  font-weight: 700;
}

.aep-score-pill {
  display: inline-flex;
  min-width: 55px;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e8f8f9;
  color: #087d8b;
  font-weight: 900;
}

.aep-score-pill.is-low {
  background: #fff0eb;
  color: #a64d2e;
}

.aep-certificate-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: 26px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 8%, rgba(56, 210, 222, .17), transparent 29%),
    linear-gradient(135deg, #061b3f, #083a55 62%, #0a7b86);
  color: #fff;
  box-shadow: 0 28px 70px rgba(2, 25, 48, .20);
}

.aep-certificate-panel::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(211, 179, 107, .34);
  border-radius: 21px;
  pointer-events: none;
}

.aep-certificate-copy,
.aep-certificate-preview {
  position: relative;
  z-index: 1;
}

.aep-certificate-kicker {
  color: #d9bd7e;
  font-size: 10px;
}

.aep-certificate-copy h3 {
  margin: 15px 0 10px;
  font-size: clamp(27px, 4vw, 44px);
  letter-spacing: -.045em;
}

.aep-certificate-copy p {
  max-width: 700px;
  margin: 0;
  color: rgba(229, 244, 247, .70);
  font-size: 14px;
  line-height: 1.8;
}

.aep-certificate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 25px;
}

.aep-certificate-button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #4ddbe4, #23adbd);
  color: #052339;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 13px 30px rgba(27, 194, 207, .22);
}

.aep-certificate-button:disabled {
  opacity: .58;
  cursor: wait;
}

.aep-certificate-code {
  display: inline-flex;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  color: rgba(230, 246, 248, .65);
  font-size: 10px;
}

.aep-certificate-preview {
  align-self: center;
  min-height: 220px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  color: #0b2d44;
  box-shadow: 0 24px 50px rgba(0, 18, 34, .24);
  transform: rotate(1.2deg);
}

.aep-preview-border {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  border: 1px solid #cdb276;
  text-align: center;
}

.aep-preview-border small {
  color: #9e7d38;
  font-size: 8px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.aep-preview-border strong {
  margin-top: 12px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
}

.aep-preview-border b {
  margin-top: 14px;
  color: #087f8c;
  font-size: 20px;
}

.aep-preview-border span {
  margin-top: 10px;
  color: #64798a;
  font-size: 9px;
}

.aep-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 30px;
  border: 1px dashed rgba(10, 105, 122, .2);
  border-radius: 18px;
  background: rgba(246, 251, 252, .8);
  color: var(--aep-muted);
  text-align: center;
}

.aep-empty b {
  display: block;
  margin-bottom: 7px;
  color: #19394d;
  font-size: 15px;
}

.aep-loading,
.aep-error-state {
  display: grid;
  place-items: center;
  min-height: 420px;
  border: 1px solid var(--aep-line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .86);
  text-align: center;
}

.aep-loading i {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(14, 127, 142, .16);
  border-top-color: #0e8795;
  border-radius: 50%;
  animation: aep-spin .75s linear infinite;
}

.aep-loading span,
.aep-error-state p {
  margin-top: 13px;
  color: var(--aep-muted);
  font-size: 12px;
}

@keyframes aep-spin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  .aep-hero-grid,
  .aep-certificate-panel {
    grid-template-columns: 1fr;
  }
  .aep-readiness-card {
    grid-template-columns: auto 1fr;
    justify-items: start;
    gap: 22px;
    min-height: 0;
    text-align: start;
  }
  .aep-readiness-card > strong,
  .aep-readiness-card > span {
    grid-column: 2;
    margin: 0;
  }
  .aep-readiness-ring {
    grid-row: 1 / span 2;
    width: 132px;
    height: 132px;
  }
  .aep-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .aep-section-grid { grid-template-columns: 1fr; }
  .aep-mastery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .mrph-aep-page { gap: 15px; }
  .aep-hero { min-height: auto; padding: 25px 21px; border-radius: 23px; }
  .aep-hero h2 { font-size: 38px; }
  .aep-hero-grid { gap: 22px; }
  .aep-readiness-card { display: grid; grid-template-columns: 110px 1fr; padding: 18px; }
  .aep-readiness-ring { width: 105px; height: 105px; }
  .aep-readiness-ring b { font-size: 30px; }
  .aep-readiness-ring small { margin-top: -24px; font-size: 7px; }
  .aep-summary-grid { gap: 10px; }
  .aep-summary-card { min-height: 126px; padding: 17px; }
  .aep-summary-card b { font-size: 25px; }
  .aep-performance-stats { grid-template-columns: repeat(2, 1fr); }
  .aep-mastery-grid { grid-template-columns: 1fr; }
  .aep-error-card { grid-template-columns: 38px 1fr; }
  .aep-error-count { grid-column: 2; justify-self: start; }
  .aep-panel-head, .aep-panel-body { padding-inline: 17px; }
  .aep-certificate-panel { padding: 27px 22px; border-radius: 23px; }
  .aep-certificate-preview { transform: none; }
}
