/* Exact learner-player shell ported from the approved artifact. */
@font-face {
  font-family: Bangers;
  src: url('../assets/fonts/bangers-original.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Comic Neue';
  src: url('../assets/fonts/comic-neue-original.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Comic Neue';
  src: url('../assets/fonts/comic-neue-bold-original.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #eef4fb;
  color: #002d73;
  font-family: 'Comic Neue', 'Comic Sans MS', ui-sans-serif, system-ui, sans-serif;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #eef4fb;
  background-image: radial-gradient(#b9d4ee 1.2px, transparent 1.3px);
  background-size: 9px 9px;
}

.topbar {
  position: relative;
  height: auto;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 360px);
  grid-template-rows: auto;
  gap: 10px 22px;
  align-items: center;
  padding: 12px 28px;
  background: #fff;
  border-bottom: 7px solid #002d73;
}

.brand-group {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex-wrap: wrap;
}

.issue {
  flex: 0 0 auto;
  background: #002d73;
  color: #efbe73;
  padding: 7px 11px 5px;
  box-shadow: none;
  font-family: Bangers, Impact, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: .16em;
  transform: rotate(-2deg);
}

.course-lockup {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: #0a66c2;
  font-family: Bangers, Impact, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: .2em;
}

.course-lockup h1 {
  width: auto;
  height: auto;
  margin: 2px 0 0;
  color: #002d73;
  font-family: Bangers, Impact, sans-serif;
  font-size: clamp(26px, 3.1vw, 42px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: none;
  text-shadow: 3px 3px 0 #efbe73 !important;
  transform: none;
  white-space: normal;
}

.header-tools {
  grid-row: 1;
  grid-column: 2;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  transform: none;
}

.progress-wrap {
  position: static;
  width: auto;
}

.progress-meta {
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 0 0 6px;
  color: #002d73;
  font-family: Bangers, Impact, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: .14em;
}

.progress-meta > span:first-child {
  display: inline;
  font-size: 14px;
  transform: none;
}

.progress-meta #progressText {
  color: #0a66c2;
  font-size: 18px;
}

.progress-track {
  width: auto;
  height: 20px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 4px solid #002d73;
  box-shadow: 4px 4px 0 rgba(0, 45, 115, .85);
}

.progress-bar {
  height: 100%;
  background: #0a66c2;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .32) 0 5px, transparent 5px 11px);
  transition: width .25s ease;
}

.stage {
  width: min(1720px, calc(100vw - 80px));
  height: 100%;
  margin: 0 auto;
  padding: 22px 0 26px;
  display: grid;
  align-items: stretch;
}

.comic-page {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 25%);
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: #fff;
  border: 7px solid #002d73;
  box-shadow: 10px 10px 0 rgba(0, 45, 115, .85);
  transform: rotate(-.35deg);
}

.panels {
  position: relative;
  min-height: 0;
  padding: 14px;
  display: grid;
  align-self: stretch;
  gap: 16px;
  background: #fff;
}

.story-rail {
  padding: 20px 22px 26px;
  container-type: inline-size;
  border-left: 6px solid #002d73;
  background: #fff;
  align-content: start;
  overflow: auto;
}

.story-rail .takeaway {
  padding: 11px 13px;
  background: #fff;
  border: 3px solid #002d73;
  box-shadow: 4px 4px 0 rgba(0, 45, 115, .55);
  font-family: 'Comic Neue', 'Comic Sans MS', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(13px, 4.2cqw, 16px);
  font-weight: 700;
  line-height: 1.4;
}

.story-rail h2 {
  margin: 10px 0 12px;
  color: #fff;
  font-family: Bangers, Impact, sans-serif;
  font-size: clamp(26px, 13cqw, 44px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: none;
  text-shadow:
    3px 3px 0 #0a66c2,
    -2px 0 0 #002d73,
    0 -2px 0 #002d73,
    2px 0 0 #002d73,
    0 2px 0 #002d73;
}

.story-rail .summary {
  max-width: 900px;
  padding: 12px 14px;
  background: #f8e3c2;
  border: 4px solid #002d73;
  box-shadow: 5px 5px 0 rgba(0, 45, 115, .7);
  font-family: 'Comic Neue', 'Comic Sans MS', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(14px, 4.6cqw, 17px);
  font-weight: 700;
  line-height: 1.4;
}

.rail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  align-items: center;
}

.rail-actions .narration-btn,
.rail-actions .review-btn {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 9px 12px 7px;
  background: #fff;
  color: #002d73;
  border: 4px solid #002d73;
  box-shadow: 4px 4px 0 rgba(0, 45, 115, .8);
  font-family: Bangers, Impact, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: .1em;
  cursor: pointer;
}

.rail-actions .narration-btn {
  background: #fff;
}

.rail-actions .review-btn.reviewed {
  background: #efbe73;
}

.rail-actions .review-btn[aria-disabled="true"] {
  cursor: default;
}

.rail-timer {
  margin-top: 12px;
  text-align: left;
  color: #002d73;
  opacity: .82;
  font-family: Bangers, Impact, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: .14em;
}

.controls {
  height: auto;
  display: grid;
  grid-template-columns: 170px 1fr 200px;
  gap: 20px;
  align-items: center;
  padding: 14px 28px 18px;
  background: #fff;
  border-top: 7px solid #002d73;
}

.status {
  justify-self: center;
  display: inline-block;
  padding: 7px 14px 5px;
  background: #002d73;
  color: #efbe73;
  font-family: Bangers, Impact, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: .14em;
  transform: rotate(-.6deg);
}

.btn {
  height: auto;
  padding: 12px 14px 9px;
  background: #fff;
  color: #002d73;
  border: 5px solid #002d73;
  box-shadow: 6px 6px 0 rgba(0, 45, 115, .85);
  font-family: Bangers, Impact, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: .1em;
  cursor: pointer;
}

.btn.ghost {
  transform: rotate(-1deg);
}

.btn.primary {
  background: #efbe73;
  transform: rotate(1deg);
}

.btn:hover:not(:disabled) {
  box-shadow: 3px 3px 0 rgba(0, 45, 115, .85);
  translate: 2px 2px;
}

.btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

@media (max-width: 950px) {
  .topbar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 12px 18px;
  }

  .brand-group,
  .header-tools {
    grid-column: 1;
  }

  .header-tools {
    grid-row: 2;
    transform: none;
  }

  .stage {
    width: calc(100vw - 36px);
  }

  .comic-page {
    grid-template-columns: 1fr;
  }

  .story-rail {
    border-left: 0;
    border-top: 6px solid #002d73;
  }

  .controls {
    grid-template-columns: 140px 1fr 140px;
    padding-inline: 18px;
  }
}
