:root {
  --mp-blue:#009CEA;
  --mp-green:#7CBB00;
  --mp-orange:#D66B07;
  --mp-yellow:#EAAA00;
  --mp-dark:#17324d;
  --mp-muted:#5f7187;
  --mp-border:#e4edf6;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body.mp-ce2-data-page {
  margin: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(0,156,234,.08), transparent 24%),
    radial-gradient(circle at 90% 12%, rgba(234,170,0,.10), transparent 24%),
    #f6f8fb;
  color: var(--mp-dark);
  font-family: Arial, Helvetica, sans-serif;
  padding-bottom: 22px;
}

.mp-nav-wrap {
  max-width: 1120px;
  margin: 18px auto 16px;
  padding: 0 15px;
}

.mp-nav-wrap .navbar {
  margin: 0;
  min-height: 100px;
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15,23,42,.08);
}

.mp-nav-wrap .navbar-brand {
  height: auto;
  padding: 12px 15px;
}

.mp-nav-wrap .navbar-brand img {
  max-height: 78px;
  width: auto;
  display: block;
}

.mp-nav-wrap .navbar-nav { margin-top: 24px; }

.mp-nav-wrap .navbar-nav > li > a {
  color: #fff !important;
  font-weight: 800;
  padding: 13px 18px;
  line-height: 20px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(15,23,42,.14);
  margin: 0 5px;
  transition: all .15s ease;
}

.mp-nav-wrap .navbar-nav > li > a:hover,
.mp-nav-wrap .navbar-nav > li > a:focus {
  color: #fff !important;
  text-decoration: none;
  filter: brightness(.97);
  transform: translateY(-2px);
}

.mp-nav-wrap .navbar-toggle {
  margin-top: 30px;
  margin-right: 15px;
}

.mp-breadcrumb {
  max-width: 1120px;
  margin: 0 auto 16px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  color: #52657a;
  font-size: 14px;
  font-weight: 700;
}

.mp-breadcrumb a {
  color: #007bb9;
  text-decoration: none;
}

.mp-breadcrumb a:hover {
  text-decoration: underline;
}

.mp-hero {
  margin: 10px auto 22px;
  padding: 38px 32px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(0,156,234,.18), transparent 34%),
    linear-gradient(135deg,#fff 0%,#eef8ff 100%);
  border: 1px solid rgba(0,156,234,.16);
  box-shadow: 0 14px 38px rgba(15,23,42,.10);
  display: grid;
  grid-template-columns: 92px minmax(0,1fr);
  gap: 24px;
  align-items: center;
}

.mp-hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: var(--mp-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #fff;
  box-shadow: 0 14px 28px rgba(0,156,234,.22);
}

.mp-eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0,156,234,.13);
  color: #006da3;
  font-weight: 900;
  margin-bottom: 14px;
}

.mp-hero h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 900;
  color: #1f2937;
}

.mp-hero p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--mp-muted);
  max-width: 850px;
  margin: 0;
}

.mp-hero-level {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #bfdff3;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  font-weight: 900;
  color: #0f3554;
}

.mp-hero-level img {
  height: 58px;
  width: auto;
  display: block;
}

.mp-actions { margin-top: 22px; }

.mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 46px;
  padding: 13px 20px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none !important;
  margin: 0 8px 10px 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.mp-btn:hover { transform: translateY(-2px); }

.mp-btn-primary {
  background: var(--mp-blue);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(0,156,234,.22);
}

.mp-btn-secondary {
  background: #fff;
  color: var(--mp-dark) !important;
  border: 1px solid #d8e2eb;
}

.mp-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.mp-quick-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 22px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #eef8ff, #fff7e9);
  border: 1px solid #cfe8f8;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.mp-quick-access strong,
.mp-quick-access span { display: block; }

.mp-quick-access strong {
  color: #0f3554;
  font-size: 18px;
}

.mp-quick-access span { color: var(--mp-muted); }

.mp-card {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(15,23,42,.07);
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}

.mp-card h2,
.mp-card h3 {
  margin-top: 0;
  font-weight: 900;
}

.mp-card h2 { font-size: 29px; }

.mp-card h3 {
  font-size: 22px;
  margin-top: 22px;
}

.mp-card p,
.mp-lesson-list,
.mp-correction-content {
  font-size: 17px;
  line-height: 1.75;
}

.mp-card p { color: var(--mp-muted); }

.mp-objective-box,
.mp-reminder,
.mp-table-demo,
.mp-line-demo {
  border-radius: 20px;
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 17px;
  line-height: 1.7;
}

.mp-objective-box { border-left: 6px solid var(--mp-blue); }

.mp-reminder {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.mp-table-demo table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.mp-table-demo th,
.mp-table-demo td {
  border: 1px solid #dbeafe;
  padding: 11px;
  font-size: 16px;
  text-align: left;
}

.mp-table-demo th {
  background: var(--mp-blue);
  color: #fff;
}

.mp-bars-demo {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  align-items: end;
  padding: 20px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mp-demo-bar {
  display: grid;
  align-items: end;
  height: 100%;
  text-align: center;
  font-weight: 900;
  color: #0f3554;
  position: relative;
}

.mp-demo-bar::before {
  content: '';
  display: block;
  height: var(--h);
  min-height: 28px;
  width: 100%;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, #80d7ff, #009CEA);
  box-shadow: inset 0 -10px 22px rgba(0,0,0,.08);
}

.mp-demo-bar span {
  position: absolute;
  top: calc(100% - var(--h) - 28px);
  left: 0;
  right: 0;
  color: #0f3554;
}

.mp-demo-bar strong {
  margin-top: 7px;
  font-size: 14px;
}

.mp-line-demo svg {
  display: block;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.mp-line-demo .axis {
  stroke: #345;
  stroke-width: 3;
}

.mp-line-demo .line {
  fill: none;
  stroke: #009CEA;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mp-line-demo circle { fill: #EAAA00; }

.mp-line-demo text {
  font-size: 18px;
  font-weight: 800;
  fill: #17324d;
}

.mp-method-steps,
.mp-related-grid {
  display: grid;
  gap: 12px;
  margin: 16px 0 22px;
}

.mp-method-steps { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mp-related-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }

.mp-method-steps div {
  min-width: 0;
  border: 1px solid #bfdff3;
  background: #eef8ff;
  border-radius: 18px;
  padding: 14px;
}

.mp-method-steps span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--mp-blue);
  color: #fff;
  font-weight: 900;
  margin-bottom: 8px;
}

.mp-method-steps strong {
  display: block;
  color: #0f3554;
  font-size: 18px;
}

.mp-quiz-card {
  background:
    radial-gradient(circle at 0 0, rgba(0,156,234,.09), transparent 26%),
    #fff;
}

.mp-quiz-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.mp-step-pill,
.mp-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 18px;
  font-weight: 900;
}

.mp-step-pill {
  color: #4c1d95;
  background: #e9d5ff;
}

.mp-score-pill {
  color: #365314;
  background: #ecfccb;
}

.mp-quiz-card h2 {
  font-size: 34px;
  line-height: 1.18;
  margin-bottom: 8px;
}

.mp-quiz-instruction {
  margin-bottom: 16px;
}

.mp-mini-document {
  border-radius: 20px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #17324d;
  font-size: 16px;
  line-height: 1.55;
}

.mp-mini-document strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.mp-mini-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-top: 8px;
}

.mp-mini-table th,
.mp-mini-table td {
  border: 1px solid #dbeafe;
  padding: 8px;
  text-align: center;
}

.mp-order-area {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
  margin: 18px 0 24px;
}

.mp-slot-wrap {
  min-width: 0;
  position: relative;
}

.mp-slot-hint {
  display: block;
  min-height: 22px;
  margin: 0 0 6px;
  color: #536d88;
  font-weight: 900;
  font-size: 15px;
}

.mp-slot {
  min-height: 96px;
  border: 3px solid #f2ad2f;
  border-radius: 16px;
  background: #fff5cc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55);
}

.mp-slot::before {
  content: attr(data-number);
  position: absolute;
  top: 30px;
  left: 12px;
  color: #a17a22;
  font-weight: 900;
}

.mp-slot.is-over {
  background: #eef8ff;
  border-color: var(--mp-blue);
}

.mp-slot.is-correct { border-color: #22c55e; background: #dcfce7; }
.mp-slot.is-wrong { border-color: #ef4444; background: #fee2e2; }

.mp-bank-title {
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 10px;
}

.mp-label-bank {
  min-height: 112px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border: 2px dashed #cbd8e6;
  border-radius: 22px;
  background: #f8fafc;
  margin-bottom: 18px;
}

.mp-label {
  min-width: 108px;
  max-width: 100%;
  border: 2px solid #cbd8e6;
  border-radius: 13px;
  background: #fff;
  color: #0f2742;
  padding: 13px 17px;
  font-size: 18px;
  font-weight: 900;
  cursor: grab;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  touch-action: manipulation;
}

.mp-label:active { cursor: grabbing; }

.mp-label.is-selected {
  outline: 4px solid rgba(0,156,234,.25);
  background: #eef8ff;
}

.mp-label.is-correct { border-color: #22c55e; }
.mp-label.is-wrong { border-color: #ef4444; }

.mp-feedback {
  display: none;
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 900;
}

.mp-feedback.is-visible { display: block; }
.mp-feedback.is-good { background: #dcfce7; color: #166534; }
.mp-feedback.is-bad { background: #fee2e2; color: #991b1b; }

.mp-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mp-help-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff7e6;
  border: 1px solid #f8d894;
  color: #17324d;
}

.mp-help-box p {
  margin: 4px 0 0;
}

.mp-correction-toggle {
  width: 100%;
  border: 0;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--mp-blue), #38bdf8);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.mp-correction-content { margin-top: 18px; }
.mp-correction-content li { margin-bottom: 10px; }

.mp-related-grid a {
  display: block;
  border-radius: 18px;
  border: 1px solid #bfdff3;
  background: #eef8ff;
  color: #0f3554;
  padding: 13px 14px;
  font-weight: 900;
  text-decoration: none !important;
}

.mp-related-grid a:hover { background: #dff2ff; }

.mp-printables-footer,
.mp-page-footer {
  margin: 30px 0 10px;
  padding: 22px 24px;
  border-radius: 24px;
  background: #17324d;
  color: #eaf6ff;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  font-size: 15px;
  line-height: 1.8;
}

.mp-page-footer a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mp-page-footer strong {
  color: #ffffff;
}

@media (max-width: 991px) {
  .mp-method-steps,
  .mp-related-grid {
    grid-template-columns: 1fr;
  }

  .mp-order-area {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 767px) {
  .mp-nav-wrap {
    margin-top: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .mp-nav-wrap .navbar {
    min-height: 0;
    border-radius: 0 0 18px 18px;
  }

  .mp-nav-wrap .navbar-brand img { max-height: 64px; }
  .mp-nav-wrap .navbar-nav { margin-top: 7.5px; }

  .mp-nav-wrap .navbar-nav > li > a {
    display: block;
    margin: 6px 0;
    text-align: center;
  }

  .mp-nav-wrap .navbar-toggle { margin-top: 24px; }

  .mp-breadcrumb {
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.55;
  }

  .mp-hero {
    grid-template-columns: 1fr;
    padding: 24px 18px;
    border-radius: 24px;
  }

  .mp-hero-icon {
    width: 74px;
    height: 74px;
    font-size: 34px;
  }

  .mp-hero h1 { font-size: 31px; }

  .mp-hero-level,
  .mp-quick-access { width: 100%; }

  .mp-hero-level { justify-content: center; }

  .mp-quick-access {
    align-items: stretch;
    flex-direction: column;
  }

  .mp-card {
    padding: 18px;
    border-radius: 22px;
  }

  .mp-card h2 { font-size: 25px; }
  .mp-quiz-card h2 { font-size: 28px; }

  .mp-actions,
  .mp-quiz-actions {
    flex-direction: column;
  }

  .mp-btn { width: 100%; }

  .mp-quiz-head {
    align-items: stretch;
    flex-direction: column;
  }

  .mp-order-area {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mp-slot {
    min-height: 76px;
  }

  .mp-slot::before {
    top: 28px;
  }

  .mp-label {
    width: 100%;
    min-width: 0;
  }

  .mp-bars-demo {
    height: 190px;
    gap: 8px;
    padding: 14px;
  }

  .mp-page-footer,
  .mp-page-footer .text-right {
    text-align: left !important;
  }
}