/* "Content-only maximise" (js/ui/content-maximize.js): the button sits last
   in the top bar; with body.content-max the top bar keeps nothing but that
   button and floats in the corner as the restore control, so the page content
   (or, on the simulator, the open lesson) fills the window. */
.content-max-btn {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid #2c3850;
  border-radius: 8px;
  background: #1a2233;
  color: #8a96ad;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.content-max-btn[hidden] { display: none; }
.content-max-btn:hover { color: #e6edf7; border-color: #ffb020; }
.content-max-btn:focus-visible { outline: 2px solid #ffb020; outline-offset: 2px; color: #e6edf7; }
.content-max-btn[aria-pressed="true"] { color: #ffb020; border-color: #ffb020; }
.content-max-btn svg { display: block; pointer-events: none; }
.content-max-btn .icon-exit,
.content-max-btn[aria-pressed="true"] .icon-enter { display: none; }
.content-max-btn[aria-pressed="true"] .icon-exit { display: block; }
@media (prefers-reduced-motion: reduce) { .content-max-btn { transition: none; } }
@media print { .content-max-btn { display: none; } }

/* Maximised: brand, page controls and site navigation are hidden; the bar
   itself shrinks to a floating corner holding the restore button. */
body.content-max .topbar > :not(.content-max-btn) { display: none; }
body.content-max .topbar,
body.page.content-max .topbar {
  position: fixed;
  top: 8px;
  right: 8px;
  left: auto;
  z-index: 700;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
body.content-max .content-max-btn { background: rgba(10, 14, 22, .86); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }

/* Content pages (css/page-shell.css): the single column uses the full width. */
body.page.content-max main.page-main { width: calc(100% - 32px); max-width: none; margin-top: 48px; }

/* Simulator: only the open lesson is left (panels, viewport and footer hidden). */
body.content-max #app { grid-template-rows: minmax(0, 1fr); }
body.content-max #app > .workspace,
body.content-max #app > .site-footer { display: none; }
body.content-max #app > .lesson-banner.lesson-player {
  max-height: none;
  margin: 0;
  padding: 24px 64px 32px 28px; /* right: room for the restore button */
  border: 0;
  border-radius: 0;
  overflow-y: auto;
}
body.content-max .lesson-player .lp-title { font-size: 18px; }
body.content-max .lesson-player .lp-step-title { font-size: 19px; }
body.content-max .lesson-player .lp-instruction { font-size: 16px; line-height: 1.7; }
body.content-max .lesson-player .lp-text { max-width: none; }
