/* ==========================================================================
   Portfolio Risk Management — lesson page styling
   MacroFinance AI Team

   Everything here is scoped to .mf-prm-lesson, which only the importer emits,
   so no other course on this installation is affected. The palette matches
   the slide decks so the embedded deck and the reading notes below it read as
   one document rather than two.
   ========================================================================== */

.mf-prm-lesson {
  --ai-bg: #0B1220;
  --ai-panel: #131E30;
  --ai-line: #25344C;
  --ai-ink: #1B2430;
  --ai-ink2: #3E4B5C;
  --ai-mute: #63728A;
  --ai-gold: #A5851F;
  --ai-blue: #2F6E9E;
  max-width: 74ch;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ai-ink2);
}

.mf-prm-lesson .mf-deck {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 0 14px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ai-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ai-bg);
}

.mf-prm-lesson .mf-deck iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The deck is wider than the reading column; let it use the full content
   width while the prose stays at a comfortable measure. */
.mf-prm-lesson > .mf-deck,
.mf-prm-lesson > .mf-deckbar {
  max-width: none;
}

.mf-prm-lesson .mf-deckbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--ai-mute);
}

.mf-prm-lesson .mf-open {
  display: inline-block;
  padding: 9px 16px;
  background: var(--ai-bg);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.mf-prm-lesson .mf-open:hover { background: #16233a; }

.mf-prm-lesson h2 {
  font-size: 25px;
  line-height: 1.24;
  font-weight: 700;
  color: var(--ai-ink);
  margin: 34px 0 10px;
  letter-spacing: -0.01em;
}

.mf-prm-lesson h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ai-ink);
  margin: 24px 0 8px;
}

.mf-prm-lesson p { margin: 0 0 15px; }

.mf-prm-lesson ul { margin: 0 0 16px; padding-left: 22px; }
.mf-prm-lesson li { margin: 0 0 7px; }

.mf-prm-lesson strong { color: var(--ai-ink); font-weight: 650; }

.mf-prm-lesson hr {
  border: 0;
  border-top: 1px solid var(--ai-line);
  opacity: 0.35;
  margin: 30px 0;
}

.mf-prm-lesson blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--ai-gold);
  background: rgba(165, 133, 31, 0.06);
  border-radius: 0 8px 8px 0;
}

.mf-prm-lesson blockquote p { margin: 0; font-size: 17px; }

.mf-prm-lesson table.mf-table {
  width: 100%;
  max-width: none;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 15.5px;
  line-height: 1.45;
}

.mf-prm-lesson table.mf-table th {
  text-align: left;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ai-blue);
  font-weight: 700;
  padding: 0 14px 9px 0;
  border-bottom: 1px solid var(--ai-line);
}

.mf-prm-lesson table.mf-table td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid rgba(37, 52, 76, 0.22);
  vertical-align: top;
}

.mf-prm-lesson table.mf-table tr:last-child td { border-bottom: 0; }

.mf-prm-lesson code {
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  background: rgba(37, 52, 76, 0.10);
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .mf-prm-lesson { font-size: 16px; }
  .mf-prm-lesson table.mf-table { font-size: 14px; }
}
