/* The desktop lesson is an art-directed player. The existing mobile layout is retained. */
.lesson-sidebar,
.lesson-heading,
.replay {
  display: none;
}

@media (min-width: 651px) {
  body[data-chapter="primer"],
  body[data-chapter="wick"],
  body[data-chapter="footprint"],
  body[data-chapter="heatmap"],
  body[data-lesson-style="compact"] {
    --bg: #0c1115;
    --panel: #10191e;
    --line: #243038;
    --muted: #92a2a8;
    --buy: #a0dfce;
    --sell: #e0be8d;
    --sidebar: 240px;
    background:
      radial-gradient(ellipse at 76% 4%, #25333235, transparent 48%), var(--bg);
  }
  .site-header {
    width: 100%;
    height: 56px;
    padding: 0 30px;
    background: #0d1418;
    border-color: #202b31;
  }
  .brand {
    font-size: 16px;
    letter-spacing: -0.3px;
    gap: 11px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .series {
    font-size: 10px;
    letter-spacing: 1.3px;
  }
  .lesson-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    bottom: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2d4348 transparent;
    left: 0;
    width: var(--sidebar);
    padding: 29px 17px 20px;
    border-right: 1px solid #202b31;
    background: #0d1418;
  }
  .academy-home {
    display: flex;
    position: sticky;
    top: -29px;
    z-index: 2;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px;
    margin-top: -14px;
    background: #0d1418;
    box-shadow: 0 5px 12px #0d1418;
    font-size: 15px;
    letter-spacing: 1px;
  }
  .academy-home > span {
    font-size: 8px;
    letter-spacing: 2.2px;
    color: #788c91;
  }
  .sidebar-label {
    margin: 10px 12px 26px;
    font-size: 10px;
    color: #71868e;
    letter-spacing: 0.4px;
  }
  .course-group {
    margin: 22px 12px 8px;
    color: #8a9e98;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1.4px;
  }
  .course-group:first-child {
    margin-top: 0;
  }
  .lesson-prerequisite {
    display: block;
    margin: 18px 12px 0;
    padding-top: 14px;
    border-top: 1px solid #26363c;
    color: #7d959b;
    font-size: 10px;
    line-height: 1.8;
  }
  .lesson-prerequisite strong {
    display: block;
    color: #b3cec3;
    font-weight: 400;
    margin-top: 5px;
  }
  .lesson-prerequisite:hover strong {
    color: var(--buy);
  }
  .course-menu > a {
    display: flex;
    gap: 12px;
    padding: 15px 12px;
    border-radius: 8px;
  }
  .course-menu > a:hover {
    background: #b3d8cb06;
  }
  .course-menu .course-current {
    background: #a0dfce0a;
    border: 1px solid #a0dfce17;
  }
  .course-number {
    padding-top: 2px;
    color: #60777e;
    font:
      11px ui-monospace,
      monospace;
  }
  .course-current .course-number {
    color: var(--buy);
  }
  .course-menu small {
    display: block;
    color: #81969d;
    font-size: 9px;
    letter-spacing: 0.8px;
    margin-bottom: 7px;
  }
  .course-menu strong {
    display: block;
    color: #b0c0c4;
    font-size: 11px;
    line-height: 1.7;
    font-weight: 500;
  }
  .course-current strong {
    color: #d9ebe4;
  }
  .chapter-menu {
    margin: 12px 0 16px 24px;
    border-left: 1px solid #25363b;
    padding: 0 0 0 15px;
  }
  .chapter-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    color: #778e97;
    font-size: 11px;
    padding: 5px 2px;
  }
  .chapter-menu i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #364b51;
  }
  .chapter-menu button:hover {
    color: #d2e4df;
  }
  .chapter-menu button[aria-current] {
    color: var(--buy);
  }
  .chapter-menu button[aria-current] i {
    background: var(--buy);
    box-shadow: 0 0 8px #8bd7c455;
  }
  .chapter-menu .visited i {
    background: #688c81;
  }
  .sidebar-note {
    margin: auto 12px 0;
    padding-top: 24px;
    display: flex;
    gap: 13px;
    align-items: center;
  }
  .note-orbit {
    display: grid;
    place-items: center;
    border: 1px solid #3b514b;
    color: #91b4a8;
    border-radius: 50%;
    width: 30px;
    height: 30px;
  }
  .sidebar-note p {
    color: #70858c;
    font-size: 10px;
    line-height: 1.9;
  }
  main {
    width: auto;
    max-width: none;
    margin: 0 auto 0 var(--sidebar);
    padding: 20px 34px 0;
  }
  .lesson-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 16px;
  }
  .lesson-heading p {
    margin: 0 0 8px;
    font-size: 9px;
    color: #acbcad;
    letter-spacing: 1.8px;
  }
  .lesson-heading p span {
    color: #40514f;
    padding: 0 7px;
  }
  .lesson-heading h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 500;
    letter-spacing: -0.5px;
  }
  .lesson-format {
    color: #a1b6ad;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    white-space: nowrap;
  }
  .lesson-format i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--buy);
  }
  .lesson-format > span {
    margin-left: 8px;
    color: #657d85;
  }
  .scene-meta {
    margin: 0 2px 12px;
    font-size: 10px;
    color: #99acae;
    letter-spacing: 0.5px;
  }
  .scene-route {
    gap: 4px;
  }
  .scene-route li {
    width: 22px;
  }
  .lesson-player {
    display: grid;
    grid-template-rows: 44px minmax(310px, 1fr) 100px 30px 44px;
    height: max(530px, calc(100svh - 198px));
    max-height: 830px;
    border: 1px solid #2b3b40;
    border-radius: 12px;
    overflow: hidden;
    background: #10191e;
    box-shadow: 0 20px 60px #00000021;
  }
  .stage {
    display: contents;
  }
  .stage-top {
    grid-row: 1;
    padding: 0 24px;
    border-bottom: 1px solid #26383c70;
    background: #111b20;
  }
  .instrument {
    gap: 12px;
  }
  .instrument strong {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
  }
  .instrument small {
    font-size: 9px;
    color: #6f8a91;
  }
  .clock {
    gap: 12px;
  }
  .clock span {
    color: #93b5aa;
    font-size: 9px;
  }
  .clock b {
    font-size: 10px;
    color: #9bb0b6;
  }
  .canvas {
    grid-row: 2;
    min-height: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 65%, #244e492b, transparent 55%);
  }
  #market {
    width: 100%;
    height: 100%;
  }
  .stage-bottom {
    display: none;
  }
  .story-copy {
    grid-row: 3;
    min-height: 0;
    padding: 17px 28px 10px;
    text-align: center;
    border-top: 1px solid #2d424549;
    background: linear-gradient(180deg, #13212766, #111a1f);
  }
  .story-copy #eyebrow {
    margin: 0 0 7px;
    color: #bdc2a9;
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .story-copy h1 {
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.3px;
    line-height: 1.5;
  }
  #question {
    margin: 5px 0 0;
    font-size: 12px;
    color: #9eb3b8;
    line-height: 1.8;
  }
  body[data-chapter="footprint"] .lesson-player,
  body[data-chapter="heatmap"] .lesson-player,
  body[data-lesson-style="compact"] .lesson-player {
    grid-template-rows: 44px minmax(310px, 1fr) 66px 30px 44px;
  }
  body[data-chapter="footprint"] .story-copy,
  body[data-chapter="heatmap"] .story-copy,
  body[data-lesson-style="compact"] .story-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
  }
  body[data-chapter="footprint"] #eyebrow,
  body[data-chapter="footprint"] #question:empty,
  body[data-chapter="heatmap"] #eyebrow,
  body[data-chapter="heatmap"] #question:empty,
  body[data-lesson-style="compact"] #eyebrow,
  body[data-lesson-style="compact"] #question:empty {
    display: none;
  }
  .timeline {
    grid-row: 4;
    margin: 0 25px;
    padding: 0;
    gap: 12px;
  }
  .timeline label {
    font-size: 9px;
    color: #759098;
  }
  .elapsed {
    font-size: 10px;
    color: #819aa2;
  }
  .story-controls {
    grid-row: 5;
    padding: 0 25px 9px;
    gap: 18px;
  }
  .story-controls button {
    min-height: 32px;
  }
  .back {
    font-size: 10px;
    padding: 5px 0;
  }
  .advance {
    margin-left: auto;
    gap: 12px;
  }
  .pause {
    padding: 6px 18px;
    min-width: 76px;
    font-size: 11px;
    border: 1px solid #a0dfce45 !important;
    border-radius: 5px;
    color: #c6e5da;
    background: #a0dfce09;
  }
  .next {
    padding: 6px 12px;
    min-width: 92px;
    gap: 12px;
    background: transparent;
    color: #a9c1bb;
    font-weight: 400;
    font-size: 10px;
    border-color: #3b5052 !important;
    border-radius: 5px;
  }
  .next span {
    font-size: 12px;
  }
  .next:hover:not(:disabled) {
    background: #a0dfce13;
  }
  .next:disabled {
    color: #5f7980;
    background: transparent;
    border-color: #263d42 !important;
  }
  .replay {
    display: block;
    order: -1;
    background: transparent;
    border: 0;
    color: #8ea6ab;
    font-size: 10px;
    padding: 4px 0;
  }
  .replay:hover {
    color: var(--buy);
  }
  footer {
    width: auto;
    margin: 0 34px 0 calc(var(--sidebar) + 34px);
    padding: 13px 0 15px;
    border: 0;
    font-size: 9px;
    color: #647e83;
  }
}

@media (min-width: 651px) and (max-width: 1150px) {
  body[data-chapter="primer"],
  body[data-chapter="wick"],
  body[data-chapter="footprint"],
  body[data-chapter="heatmap"],
  body[data-lesson-style="compact"] {
    --sidebar: 205px;
  }
  main {
    padding-right: 22px;
    padding-left: 22px;
  }
  .lesson-sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .course-menu strong {
    font-size: 10px;
  }
  .lesson-heading h2 {
    font-size: 20px;
  }
  .lesson-format > span,
  .instrument small {
    display: none;
  }
  .story-copy h1 {
    font-size: 18px;
  }
  #question {
    font-size: 11px;
  }
}
