:root {
  --mp-blue:#009CEA;
  --mp-green:#7CBB00;
  --mp-orange:#D66B07;
  --mp-yellow:#EAAA00;
  --mp-dark:#243447;
  --mp-muted:#64748b;
  --mp-border:#e6edf4;
}

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

* {
  box-sizing: border-box;
}

body.mp-cm1-vivant-page {
  margin: 0;
  background: #f6f8fb;
  color: var(--mp-dark);
  font-family: Arial, Helvetica, sans-serif;
  padding-bottom: 20px;
}

.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-hero {
  margin: 26px auto 22px;
  padding: 38px 32px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(124,187,0,.20), transparent 34%),
    linear-gradient(135deg,#fff 0%,#f3ffe6 100%);
  border: 1px solid rgba(124,187,0,.20);
  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-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #fff;
  box-shadow: 0 14px 28px rgba(124,187,0,.24);
}

.mp-eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(124,187,0,.15);
  color: #3f6f00;
  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 #cfe8b8;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  font-weight: 900;
  color: #244500;
}

.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: 800;
  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-green);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(124,187,0,.22);
}

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

.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, #f3ffe6, #fff7e9);
  border: 1px solid #d9efc3;
  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: #244500;
  font-size: 18px;
}

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

.mp-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 22px;
  align-items: start;
}

.mp-main-column,
.mp-side-column {
  min-width: 0;
}

.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,
.mp-question label,
.mp-question legend {
  font-size: 17px;
  line-height: 1.75;
}

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

.mp-objective-box,
.mp-focus-card,
.mp-reminder,
.mp-sentence {
  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-green);
}

.mp-focus-card {
  border-left: 6px solid var(--mp-orange);
  margin: 16px 0;
}

.mp-reminder {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.mp-lesson-list {
  padding-left: 22px;
}

.mp-lesson-list li {
  margin-bottom: 8px;
}

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

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

.mp-example-grid div {
  min-width: 0;
  border: 1px solid #d9efc3;
  background: #f3ffe6;
  border-radius: 18px;
  padding: 14px;
}

.mp-example-grid strong {
  display: block;
  color: #244500;
  font-size: 18px;
}

.mp-example-grid span {
  display: block;
  color: var(--mp-muted);
  margin-top: 5px;
  line-height: 1.55;
}

.mp-ex-block {
  border-top: 1px solid #e2e8f0;
  padding-top: 18px;
  margin-top: 18px;
}

.mp-question {
  border: 0;
  padding: 0;
  margin: 12px 0 0;
}

.mp-question legend {
  border: 0;
  font-weight: 900;
  color: var(--mp-dark);
  margin-bottom: 10px;
}

.mp-question label {
  display: block;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 13px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  font-weight: 700;
}

.mp-question label:hover {
  border-color: #c7e8a5;
  background: #f3ffe6;
}

.mp-question input {
  margin-right: 8px;
}

.mp-label-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  min-height: 70px;
  margin: 12px 0 16px;
}

.mp-label {
  border: 0;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #c7e8a5;
  color: #244500;
  font-weight: 900;
  padding: 10px 14px;
  cursor: grab;
  box-shadow: 0 6px 14px rgba(15,23,42,.08);
  touch-action: manipulation;
}

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

.mp-label.is-selected {
  outline: 4px solid rgba(124,187,0,.25);
  background: #f3ffe6;
}

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

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

.mp-drop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.mp-drop-zone {
  border: 2px solid #d9efc3;
  background: #fbfff6;
  border-radius: 20px;
  padding: 14px;
  min-width: 0;
}

.mp-drop-zone > strong {
  display: block;
  margin-bottom: 10px;
  color: #244500;
  font-size: 18px;
}

.mp-drop-area {
  min-height: 74px;
  border-radius: 16px;
  border: 2px dashed #cbd5e1;
  background: rgba(255,255,255,.8);
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.mp-drop-area.is-over {
  border-color: var(--mp-green);
  background: #f3ffe6;
}

.mp-match-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mp-match-row {
  display: grid;
  grid-template-columns: 180px minmax(0,1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.mp-match-row p {
  margin: 0;
}

.mp-match-drop {
  min-height: 58px;
  align-items: center;
}

.mp-question.is-correct,
.mp-drag-exercise.is-correct {
  border-radius: 18px;
  box-shadow: inset 0 0 0 3px #86efac;
  padding: 8px;
  background: #f0fdf4;
}

.mp-question.is-wrong,
.mp-drag-exercise.is-wrong {
  border-radius: 18px;
  box-shadow: inset 0 0 0 3px #fecaca;
  padding: 8px;
  background: #fef2f2;
}

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

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

.mp-result.is-visible {
  display: block;
  background: #f3ffe6;
  color: #244500;
  border: 1px solid #c7e8a5;
}

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

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

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

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

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

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

.mp-side-column {
  position: sticky;
  top: 18px;
}

.mp-tip-card {
  background: linear-gradient(135deg, #f3ffe6, #ffffff);
}

.mp-mini-card p {
  margin-bottom: 8px;
}

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

  .mp-side-column {
    position: static;
  }

  .mp-example-grid,
  .mp-drop-grid,
  .mp-related-grid {
    grid-template-columns: 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-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-actions,
  .mp-quiz-actions {
    flex-direction: column;
  }

  .mp-btn {
    width: 100%;
  }

  .mp-question label {
    overflow-wrap: anywhere;
  }

  .mp-match-row {
    grid-template-columns: 1fr;
  }
}