/* The side panel: a wide sidebar that is always there, the sections in groups with script titles; on a phone a top
   bar and a menu sliding over the page. */

.lms ~ .cb-main { margin-left: 288px; }
.lms ~ .ftr-lms { margin-left: 288px; }

.lms-side {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; display: flex; flex-direction: column; gap: 18px; width: 288px;
  padding: 26px 18px 22px; overflow-y: auto; border-right: 1px solid rgba(232, 193, 166, .14);
  background: radial-gradient(120% 50% at 0% 0%, rgba(107, 18, 24, .45) 0%, rgba(107, 18, 24, 0) 70%), linear-gradient(180deg, #1A0809 0%, #0B0606 100%);
}
.lms-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--accent); }
.lms-brand-mark { font-size: 16px; }
.lms-brand-name { font: 400 17px/1.15 var(--f-display); letter-spacing: .1em; text-transform: uppercase; }

.lms-me {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; border: 1px solid rgba(232, 193, 166, .18);
  background: rgba(11, 6, 6, .5); transition: border-color .15s ease;
}
.lms-me:hover, .lms-me--on { border-color: rgba(232, 193, 166, .45); }
.lms-me-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.lms-me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 15px; }
.lms-me-sub { font-size: 12px; color: var(--text-3); }
.lms-me .i { width: 16px; height: 16px; color: var(--accent); }

.lms-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 999px;
  background: linear-gradient(180deg, #F6D9C4 0%, #C98F70 100%); color: #3A1410; font: 400 15px/1 var(--f-display);
  letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 10px 30px rgba(201, 143, 112, .3);
}
.lms .lms-cta { color: #3A1410; }

.lms-groups { display: flex; flex-direction: column; }
.lms-group-title { margin: 14px 10px 4px; font: 400 22px/1.2 'Artist Script', cursive; color: var(--accent); }
.lms-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lms-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid transparent;
  font-size: 15px; font-weight: 500; color: var(--text-2); transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.lms-item .i { color: var(--accent); }
.lms-item:hover { background: rgba(232, 193, 166, .08); color: var(--text); }
.lms-item--on { background: linear-gradient(90deg, rgba(232, 193, 166, .2) 0%, rgba(232, 193, 166, .06) 100%); border-color: rgba(232, 193, 166, .35); color: var(--text); }

.lms-course { display: grid; gap: 12px; margin: 4px 0 2px; padding: 14px 10px 10px; border-radius: 20px; border: 1px solid rgba(232, 193, 166, .16); background: rgba(11, 6, 6, .45); }
.lms-course-name { padding: 0 4px; font: 400 14px/1.25 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.lms-course-progress { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.lms-course-done { flex: none; font-size: 12px; color: var(--text-3); }
.lms-out { margin-top: auto; padding-top: 10px; }

/* The top bar and the panel of a phone: the panel slides in over the page when the address is #lms-panel. */
.lms-top { display: none; }

@media (max-width: 1023px) {
  .lms ~ .cb-main { margin-left: 0; margin-top: 62px; }
  .lms ~ .ftr-lms { margin-left: 0; }
  .lms-top {
    position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 62px; padding: 8px 16px; border-bottom: 1px solid rgba(232, 193, 166, .14); background: rgba(11, 6, 6, .94);
  }
  .lms-top-brand { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; color: var(--accent); font: 400 15px/1.1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
  .lms-burger {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(232, 193, 166, .45);
    color: var(--accent); font: 400 14px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase;
  }
  .lms-burger-close { display: none; }
  .lms-side:target ~ .lms-top .lms-burger-open { display: none; }
  .lms-side:target ~ .lms-top .lms-burger-close { display: inline-flex; }
  .lms-side {
    top: 62px; z-index: 39; width: min(88vw, 340px); padding: 22px 18px 28px; transform: translateX(-100%);
    transition: transform .2s ease; background: linear-gradient(180deg, #1A0809 0%, #0B0606 100%);
  }
  .lms-side:target { transform: none; box-shadow: 0 0 0 100vmax rgba(5, 2, 2, .62); }
}

@media (prefers-reduced-motion: reduce) {
  .lms-side { transition: none; }
}
