/* Lesson presentation shell, matched to the BizDrive Claude classroom. */
body[data-page="lesson"] {
  margin: 0;
  overflow: hidden;
  background: #0b1530;
  color: #fff;
  overscroll-behavior: none;
}
body[data-page="lesson"] > .site-header,
body[data-page="lesson"] > .site-footer { display: none; }
body[data-page="lesson"] .viewer {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #0b1530;
  color: #fff;
  touch-action: pan-y pinch-zoom;
}
body[data-page="lesson"] .viewer-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  min-height: 66px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(0, 0, 0, .25);
  line-height: 1.5;
}
body[data-page="lesson"] .viewer-back {
  flex: 0 0 auto;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  opacity: .85;
  white-space: nowrap;
}
body[data-page="lesson"] .viewer-back:hover { opacity: 1; }
body[data-page="lesson"] .viewer-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-page="lesson"] [data-slide-count] {
  flex: 0 0 auto;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .85);
  white-space: nowrap;
}
body[data-page="lesson"] [data-next-lesson] {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f4c20f;
  color: #12275e;
  font-size: .85rem;
  font-weight: 800;
  white-space: nowrap;
}
body[data-page="lesson"] [data-open-article] {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #f4c20f;
  border-radius: 999px;
  background: #f4c20f;
  color: #12275e;
  box-shadow: 0 3px 12px rgba(244, 194, 15, .35);
  font: inherit;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}
body[data-page="lesson"] [data-open-article]:hover { background: #ffce28; }
body[data-page="lesson"] [data-open-article][aria-expanded="true"] {
  background: #fff;
  border-color: #fff;
  box-shadow: none;
}
body[data-page="lesson"] [data-fullscreen] {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .85rem;
  white-space: nowrap;
  cursor: pointer;
}
body[data-page="lesson"] .slide-stage {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
body[data-page="lesson"] .slide-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .28s ease;
  will-change: transform;
}
body[data-page="lesson"] .slide-frame {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}
/* A fixed design canvas scales as one piece, like the reference image slides. */
body[data-page="lesson"] .slide-frame > .presentation-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1600px;
  height: 900px;
  min-width: 1600px;
  max-width: none;
  max-height: none;
  margin: 0;
  transform: translate(-50%, -50%) scale(var(--slide-scale, .5));
  transform-origin: center;
  overflow: hidden;
}
body[data-page="lesson"] [data-prev-slide],
body[data-page="lesson"] [data-next-slide] {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 64px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}
body[data-page="lesson"] [data-prev-slide] { left: 12px; }
body[data-page="lesson"] [data-next-slide] { right: 12px; }
body[data-page="lesson"] [data-prev-slide]:hover,
body[data-page="lesson"] [data-next-slide]:hover {
  background: rgba(244, 194, 15, .95);
  color: #12275e;
}
body[data-page="lesson"] [data-prev-slide]:disabled,
body[data-page="lesson"] [data-next-slide]:disabled { opacity: .25; cursor: default; }
body[data-page="lesson"] .read-fab[data-open-article] { display: none; }
body[data-page="lesson"] .reading-dialog {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  width: 100%;
  max-width: 100%;
  height: 78vh;
  height: 78dvh;
  max-height: calc(100% - 20px);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 18px 18px 0 0;
  background: #fff;
  color: #27364d;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
}
body[data-page="lesson"] .reading-dialog:not([open]) { display: none; }
body[data-page="lesson"] .reading-dialog::backdrop { background: rgba(0, 0, 0, .25); }
body[data-page="lesson"] .reading-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e9f2;
  background: #fff;
}
body[data-page="lesson"] .reading-top h1 {
  margin: 0;
  color: #12275e;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0;
}
body[data-page="lesson"] [data-close-article] {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #e5e9f2;
  border-radius: 999px;
  background: #f7f9fd;
  color: #12275e;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
body[data-page="lesson"] .reading-body {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 18px 20px max(40px, env(safe-area-inset-bottom));
  font-size: 1.02rem;
  line-height: 1.9;
}
body[data-page="lesson"] .reading-body article { max-width: 100%; }
body[data-page="lesson"] .reading-body h2 {
  margin: 30px 0 10px;
  padding-left: 12px;
  border-left: 4px solid #f4c20f;
  color: #12275e;
  font-size: 1.2rem;
  line-height: 1.6;
}
body[data-page="lesson"] .reading-body h3 {
  margin: 20px 0 6px;
  color: #1b3a8c;
  font-size: 1.02rem;
  line-height: 1.7;
}
body[data-page="lesson"] .reading-body p { margin: 0 0 12px; }
body[data-page="lesson"] .reading-body ul,
body[data-page="lesson"] .reading-body ol { margin: 0 0 14px; padding-left: 24px; }
body[data-page="lesson"] .reading-body li { margin-bottom: 6px; }
body[data-page="lesson"] .reading-body a:not(.button) { color: #1b3a8c; text-decoration: underline; text-underline-offset: 3px; }
body[data-page="lesson"] .reading-body pre { white-space: pre-wrap; overflow-wrap: anywhere; }
body[data-page="lesson"] .reading-body img { max-width: 100%; height: auto; }
body[data-page="lesson"] .reading-body .lesson-panel { min-height: 0; padding: 14px 0; }
body[data-page="lesson"] .reading-body .panel-heading h2 { margin: 0; border-left: 0; padding-left: 0; }
body[data-page="lesson"] .viewer :focus-visible,
body[data-page="lesson"] .reading-dialog :focus-visible { outline: 3px solid #f4c20f; outline-offset: 4px; }
body[data-page="lesson"] #toast { z-index: 30; }
@media (max-width: 760px) {
  body[data-page="lesson"] .viewer-top { gap: 9px; }
  body[data-page="lesson"] .viewer-top [data-open-article] { padding: 8px 12px; font-size: .85rem; }
  body[data-page="lesson"] [data-fullscreen] { font-size: .78rem; }
}
@media (max-width: 640px) {
  body[data-page="lesson"] .viewer-top { min-height: 58px; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  body[data-page="lesson"] .viewer-back { font-size: .8rem; }
  body[data-page="lesson"] .viewer-title { font-size: .85rem; }
  body[data-page="lesson"] [data-slide-count] { font-size: .8rem; }
  body[data-page="lesson"] .viewer-top [data-open-article] { display: none; }
  body[data-page="lesson"] [data-fullscreen] { padding: 5px 7px; font-size: .75rem; }
  body[data-page="lesson"] [data-next-lesson] { min-height: 36px; padding: 5px 9px; font-size: .75rem; }
  body[data-page="lesson"] [data-prev-slide],
  body[data-page="lesson"] [data-next-slide] { width: 34px; height: 52px; font-size: 1.5rem; }
  body[data-page="lesson"] [data-prev-slide] { left: 6px; }
  body[data-page="lesson"] [data-next-slide] { right: 6px; }
  body[data-page="lesson"] .read-fab[data-open-article] {
    position: absolute;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    z-index: 8;
    display: block;
    max-width: calc(100% - 24px);
    min-height: 52px;
    padding: 14px 24px;
    font-size: 1rem;
    transform: translateX(-50%);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .45);
  }
  body[data-page="lesson"] .reading-dialog { height: 88vh; height: 88dvh; }
  body[data-page="lesson"] .reading-body { padding: 16px 16px max(40px, env(safe-area-inset-bottom)); font-size: 1.05rem; }
  body[data-page="lesson"] .reading-top { padding: 12px 16px; }
  body[data-page="lesson"] [data-close-article] { padding: 10px 18px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  body[data-page="lesson"] .viewer-top { min-height: 48px; padding-top: 5px; padding-bottom: 5px; }
  body[data-page="lesson"] [data-open-article] { min-height: 36px; padding-top: 5px; padding-bottom: 5px; }
  body[data-page="lesson"] .read-fab[data-open-article] { bottom: 8px; min-height: 40px; padding: 7px 16px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="lesson"] .slide-track { transition: none; }
}
