:root {
  --bg: #07131f;
  --card: rgba(11, 26, 42, 0.9);
  --card-strong: rgba(8, 21, 34, 0.96);
  --ink: #ebf4ff;
  --muted: #9fb4cc;
  --accent: #44cfaa;
  --accent-2: #ff735c;
  --warn: #c6405f;
  --line: rgba(152, 191, 224, 0.22);
  --sidebar-width: 320px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1800px 700px at 10% -20%, rgba(0, 168, 168, 0.15), transparent),
    radial-gradient(1400px 550px at 100% 0%, rgba(255, 115, 92, 0.12), transparent),
    var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.4;
}

body.app-loading {
  overflow: hidden;
}

body.app-loading .app-shell {
  visibility: hidden;
  pointer-events: none;
}

.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background:
    radial-gradient(1600px 600px at 10% 0%, rgba(0, 168, 168, 0.2), transparent),
    radial-gradient(1400px 600px at 100% 0%, rgba(255, 115, 92, 0.18), transparent),
    rgba(5, 14, 24, 0.92);
}

.startup-card {
  width: min(560px, 96vw);
  background: rgba(11, 26, 42, 0.95);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.35);
}

.startup-photo {
  width: min(386px, 90vw);
  height: min(386px, 90vw);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 2px solid rgba(160, 206, 233, 0.5);
  display: block;
  margin: 0 auto 0.7rem;
}

.startup-kicker {
  margin: 0 0 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #a8c4df;
}

.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-inline-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

.startup-thanks {
  margin: 0 0 0.55rem;
  color: #f5fbff;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.startup-card h2 {
  margin: 0 0 0.55rem;
}

.startup-card p {
  margin: 0;
}

.legacy-domain-active body {
  min-height: 100vh;
}

.legacy-domain-splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.legacy-domain-card {
  width: min(640px, 100%);
  text-align: left;
  background: rgba(8, 21, 34, 0.96);
}

.legacy-domain-kicker {
  margin: 0 0 0.6rem;
  color: #8ad6d6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legacy-domain-copy {
  margin: 0.8rem 0 0;
  color: #dcebf9;
  font-size: 1rem;
}

.legacy-domain-actions {
  margin-top: 1.25rem;
}

.legacy-domain-actions .btn {
  text-decoration: none;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(48px);
  z-index: -1;
  opacity: 0.6;
}

.bg-shape-a {
  width: 340px;
  height: 340px;
  background: rgba(0, 168, 168, 0.18);
  top: -120px;
  left: -120px;
}

.bg-shape-b {
  width: 280px;
  height: 280px;
  background: rgba(255, 115, 92, 0.2);
  bottom: -80px;
  right: -80px;
}

.app-shell {
  width: min(1480px, 97vw);
  margin: 2rem auto;
}

.app-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.app-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-header h1 {
  margin: 0;
  font-family: "Space Grotesk", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  font-size: clamp(1.45rem, 2.2vw, 2.45rem);
  letter-spacing: 0.01em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.app-header p {
  margin: 0;
  color: var(--muted);
}

.app-header-actions {
  margin-top: 0.85rem;
}

.app-menu-toggle {
  min-width: 7rem;
  gap: 0.75rem;
  padding-inline: 1rem;
  align-self: center;
}

.app-menu-toggle.hidden {
  display: none;
}

.app-menu-toggle-label {
  display: inline-block;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.8rem;
  height: 1.15rem;
}

.hamburger-menu .bar {
  width: 100%;
  height: 0.18rem;
  background: currentColor;
  border-radius: 999px;
  transform-origin: left center;
  transition: transform 200ms ease, opacity 160ms ease;
}

.app-menu-toggle[aria-expanded="true"] .hamburger-menu .bar:first-child {
  transform: rotate(38deg) translate(0.05rem, -0.02rem);
}

.app-menu-toggle[aria-expanded="true"] .hamburger-menu .bar:nth-child(2) {
  opacity: 0;
}

.app-menu-toggle[aria-expanded="true"] .hamburger-menu .bar:last-child {
  transform: rotate(-38deg) translate(0.05rem, 0.02rem);
}

.load-status {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 22px 40px rgba(1, 10, 16, 0.35);
  padding: 1.2rem 1.2rem 1.4rem;
  margin-top: 1rem;
  animation: rise-in 220ms ease;
}

.screen.hidden {
  display: none;
}

.results-confetti {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.results-confetti.active {
  opacity: 1;
}

.results-confetti-piece {
  position: absolute;
  top: -14vh;
  left: calc(var(--x, 50) * 1%);
  animation: confetti-fall var(--fall-duration, 4200ms) linear 1 both;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

.results-confetti-shape {
  display: block;
  width: var(--size, 12px);
  height: calc(var(--size, 12px) * var(--stretch, 1.2));
  background: var(--piece-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0.96;
  animation: confetti-spin var(--spin-duration, 2.4s) ease-in-out 2 both;
  animation-delay: var(--spin-delay, 0s);
  transform-origin: center;
  will-change: transform;
}

.results-confetti-shape.shape-square {
  border-radius: 2px;
}

.results-confetti-shape.shape-circle {
  border-radius: 999px;
}

.results-confetti-shape.shape-ribbon {
  border-radius: 999px;
}

.results-confetti-shape.shape-diamond {
  border-radius: 2px;
}

.results-confetti-shape.shape-triangle {
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

h2 {
  margin: 0;
}

p {
  color: var(--muted);
}

.week-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 0.5rem;
}

.mode-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mode-card {
  text-align: left;
  padding: 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(15, 40, 63, 0.94), rgba(8, 25, 40, 0.98)),
    var(--card);
  color: var(--ink);
}

.mode-card strong,
.mode-card span {
  display: block;
}

.mode-card strong {
  margin: 0.25rem 0 0.45rem;
  font-size: 1.2rem;
}

.mode-card-kicker {
  color: #8ad6d6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-changelog {
  margin-top: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-strong);
  overflow: hidden;
}

.app-header-actions {
  display: flex;
  justify-content: center;
  margin: 0.9rem 0 0.35rem;
}

.header-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(138, 214, 214, 0.24);
  border-radius: 999px;
  background: rgba(7, 22, 35, 0.64);
  color: #f5fbff;
  font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.header-toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.notes-video-shell {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0 0 var(--notes-video-safe-zone);
  border-radius: 18px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(152, 191, 224, 0.18);
  background:
    linear-gradient(180deg, rgba(0, 168, 168, 0.12), rgba(255, 115, 92, 0.08)),
    rgba(4, 13, 22, 0.95);
}

.notes-video-player {
  width: 100%;
  --plyr-color-main: var(--accent);
  --plyr-video-control-color: #f5fbff;
  --plyr-video-chrome: rgba(24, 24, 27, 0.96);
  --plyr-video-chrome-strong: rgba(15, 15, 18, 0.98);
  --plyr-video-border: rgba(255, 255, 255, 0.9);
  --plyr-video-play-background: #071f3d;
  --notes-video-play-background: #0a2a50;
  --notes-video-play-color: #0ff;
  --notes-video-play-size: 4.75rem;
  --notes-video-play-icon-size: 2rem;
  --plyr-video-progress-track: #071f3d;
  --plyr-control-icon-size: 16px;
  --plyr-font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  --plyr-menu-background: var(--plyr-video-chrome-strong);
  --plyr-menu-color: #f5fbff;
  --plyr-tooltip-background: var(--plyr-video-chrome-strong);
  --plyr-tooltip-color: #f5fbff;
  --plyr-video-range-track-background: var(--plyr-video-progress-track);
  --plyr-video-progress-buffered-background: var(--plyr-video-progress-track);
  --plyr-video-controls-background: transparent;
  --notes-video-safe-zone: clamp(3rem, 4vw, 4.5rem);
  aspect-ratio: 16 / 9;
  height: calc(100% - var(--notes-video-safe-zone));
}

.notes-video-player-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.notes-video-player iframe {
  width: 100%;
  height: 100% !important;
  border: 0;
}

[data-notes-video-player].plyr {
  position: relative;
  border-radius: 18px;
}

[data-notes-video-player] .plyr__control--overlaid {
  align-items: center;
  background: var(--notes-video-play-background) !important;
  border: 2px solid var(--plyr-video-border);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.38);
  color: var(--notes-video-play-color) !important;
  display: inline-flex;
  height: var(--notes-video-play-size);
  justify-content: center;
  min-height: var(--notes-video-play-size);
  min-width: var(--notes-video-play-size);
  opacity: 1 !important;
  padding: 0;
  transition: none !important;
  width: var(--notes-video-play-size);
}

[data-notes-video-player] .plyr__control--overlaid {
  transform: translate(-50%, -50%) !important;
}

[data-notes-video-player].plyr--video .plyr__control--overlaid:hover,
[data-notes-video-player].plyr--video .plyr__control--overlaid:focus,
[data-notes-video-player].plyr--video .plyr__control--overlaid:focus-visible,
[data-notes-video-player].plyr--video .plyr__control--overlaid[aria-expanded="true"] {
  background: var(--notes-video-play-background) !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.38) !important;
  color: var(--notes-video-play-color) !important;
  opacity: 1 !important;
  transition: none !important;
}

[data-notes-video-player].plyr--video .plyr__control--overlaid:hover,
[data-notes-video-player].plyr--video .plyr__control--overlaid:focus,
[data-notes-video-player].plyr--video .plyr__control--overlaid:focus-visible,
[data-notes-video-player].plyr--video .plyr__control--overlaid[aria-expanded="true"] {
  transform: translate(-50%, -50%) !important;
}

[data-notes-video-player] .plyr__control--overlaid svg,
[data-notes-video-player] .plyr__control--overlaid svg path,
[data-notes-video-player] .plyr__control--overlaid svg use {
  color: var(--notes-video-play-color) !important;
  fill: var(--notes-video-play-color) !important;
  stroke: var(--notes-video-play-color) !important;
}

[data-notes-video-player] .plyr__control--overlaid svg {
  height: var(--notes-video-play-icon-size);
  left: 0 !important;
  position: static !important;
  transform: none !important;
  transition: none !important;
  width: var(--notes-video-play-icon-size);
}

[data-notes-video-player] .plyr__controls {
  background: linear-gradient(180deg, rgba(15, 15, 18, 0), var(--plyr-video-chrome) 34%) !important;
  border-top: 1px solid var(--plyr-video-border);
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  bottom: 0;
  color: var(--accent);
  /* align-items: center; */
  display: flex;
  /* justify-content: flex-end; */
  left: 0;
  padding: 5px;
  padding: calc(var(--plyr-control-spacing, 10px) / 2);
  padding-top: 20px;
  padding-top: calc(var(--plyr-control-spacing, 10px) * 2);
  /* display: grid !important; */
  grid-template-columns: clamp(2.8rem, 4vw, 3.75rem) auto minmax(5.5rem, 1fr) auto auto auto clamp(9rem, 16vw, 12.5rem) auto !important;
  /* align-items: start; */
  gap: 0.45rem !important;
  padding: 0.7rem 0.85rem 1.3rem 0.55rem !important;
  font-family: "JetBrains Mono", monospace;
  pointer-events: none;
  position: absolute;
  right: 0;
  text-align: center;
  /* transition: opacity .4s ease-in-out,transform .4s ease-in-out; */
  z-index: 3;
}

[data-notes-video-player].plyr--video .plyr__controls {
  background: linear-gradient(180deg, rgba(15, 15, 18, 0), var(--plyr-video-chrome) 34%) !important;
}

[data-notes-video-player] .plyr__corner-controls {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 4;
}

[data-notes-video-player] .plyr__corner-controls > .plyr__control[data-plyr="fullscreen"] {
  background: var(--plyr-video-chrome);
  border: 1px solid var(--plyr-video-border);
  border-radius: 999px;
  pointer-events: auto;
}

[data-notes-video-player][data-notes-video-pristine] .plyr__controls {
  opacity: 0 !important;
  transform: translateY(100%) !important;
  transition: none !important;
  visibility: hidden !important;
}

[data-notes-video-player][data-notes-video-pristine] .plyr__corner-controls {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateY(-0.5rem) !important;
  transition: none !important;
  visibility: hidden !important;
}

[data-notes-video-player][data-notes-video-controls-visible="false"] .plyr__controls {
  opacity: 0 !important;
  transform: translateY(100%) !important;
  transition: none !important;
  visibility: hidden !important;
}

[data-notes-video-player][data-notes-video-controls-visible="false"] .plyr__corner-controls {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateY(-0.5rem) !important;
  transition: none !important;
  visibility: hidden !important;
}

[data-notes-video-player][data-notes-video-controls-visible="true"] .plyr__controls {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  visibility: visible !important;
}

[data-notes-video-player][data-notes-video-controls-visible="true"] .plyr__corner-controls {
  opacity: 1 !important;
  pointer-events: auto;
  transform: none !important;
  transition: none !important;
  visibility: visible !important;
}

[data-notes-video-player] .plyr__controls > *,
[data-notes-video-player] .plyr__controls .plyr__control,
[data-notes-video-player] .plyr__controls .plyr__progress,
[data-notes-video-player] .plyr__controls .plyr__progress input,
[data-notes-video-player] .plyr__controls .plyr__menu__container {
  pointer-events: auto;
}

[data-notes-video-player] .plyr__control {
  background: var(--plyr-video-chrome);
  border: 1px solid var(--plyr-video-border);
  border-radius: 999px;
  color: var(--accent) !important;
}

[data-notes-video-player] .plyr__control svg,
[data-notes-video-player] .plyr__control svg path,
[data-notes-video-player] .plyr__control svg use {
  fill: currentColor !important;
  color: inherit !important;
  stroke: currentColor !important;
}

[data-notes-video-player] .plyr__controls > [data-plyr="play"] {
  background: var(--plyr-video-play-background);
  color: var(--accent) !important;
  grid-column: 2 !important;
  transform: none !important;
}

[data-notes-video-player] .plyr__menu__container {
  background: var(--plyr-video-chrome-strong);
  border: 1px solid var(--plyr-video-border);
  border-radius: 16px;
  color: var(--plyr-video-control-color, #fff);
  overflow: hidden;
}

[data-notes-video-player] .plyr__menu__container .plyr__control {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

[data-notes-video-player] .plyr__controls .plyr__controls__item:first-child {
  margin-left: 100px;
  margin-right: 0;
}

[data-notes-video-player] .plyr__progress__container {
  grid-column: 3 !important;
  width: 700px;
  min-width: 0;
  max-width: min(100%, 700px);
  padding-left: 2.5px;
  padding-left: 20px;
}

[data-notes-video-player] .plyr__time--current {
  grid-column: 4 !important;
  min-width: max-content;
  color:var(--accent) !important;
}

[data-notes-video-player] .plyr__volume {
  grid-column: 5 !important;
}

[data-notes-video-player] .plyr__menu {
  grid-column: 6 !important;
}

[data-notes-video-player] .plyr__blankspace {
  display: block;
  flex: 0 0 120px;
  min-width: 320px;
  height: 1px;
  pointer-events: none;
}

[data-notes-video-player] .plyr__control[data-plyr="fullscreen"] {
  justify-self: end !important;
}

[data-notes-video-player] .plyr__controls > [data-plyr="pip"] {
  display: none;
}

[data-notes-video-player] .plyr__progress {
  --plyr-video-progress-buffered-background: #0ff5;
  --plyr-video-range-track-background: #0ff5;
  --plyr-range-fill-background: #0ff5;
  left: 6.5px;
  left: calc(var(--plyr-range-thumb-height, 13px) * .5);
  margin-right: 13px;
  margin-right: var(--plyr-range-thumb-height, 13px);
  position: relative;
  background: transparent !important;
  background-color: transparent !important;
  color: #0ff5 !important;
}

[data-notes-video-player] .plyr__progress input[type="range"],
[data-notes-video-player] .plyr__progress__buffer {
  margin-right: -6.5px;
  margin-right: calc(var(--plyr-range-thumb-height, 13px) * -.5);
  width: calc(100% + 13px);
  width: calc(440px + var(--plyr-range-thumb-height, 13px));
}

[data-notes-video-player] .plyr__progress input[type="range"] {
  --plyr-range-track-background: #0ff5;
  background: transparent !important;
  background-color: transparent !important;
  color: #0ff5 !important;
}

[data-notes-video-player] .plyr__progress__buffer {
  color: #0ff5 !important;
  background-color: #0ff5 !important;
}

[data-notes-video-player] .plyr__progress input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    #0ff5 var(--value, 0%),
    #0ff5 var(--value, 0%)
  ) !important;
}

[data-notes-video-player] .plyr__progress input[type="range"]::-moz-range-track {
  background: #0ff5 !important;
}

[data-notes-video-player] .plyr__progress input[type="range"]::-moz-range-progress {
  background: #0ff5 !important;
}

[data-notes-video-player] .plyr__progress__buffer::-webkit-progress-bar {
  background: #0ff5 !important;
}

[data-notes-video-player] .plyr__progress__buffer::-webkit-progress-value {
  background: #0ff5 !important;
}

[data-notes-video-player] .plyr__progress__buffer::-moz-progress-bar {
  background: #0ff5 !important;
}

[data-notes-video-player] .plyr__menu__container .plyr__control {
  font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
}

@media (max-width: 760px) {
  [data-notes-video-player] .plyr__controls {
    grid-template-columns:
      clamp(1.25rem, 3vw, 1.75rem)
      auto
      minmax(4.5rem, 1fr)
      auto
      auto
      auto
      clamp(4rem, 10vw, 5.5rem)
      auto !important;
    gap: 0.35rem !important;
    padding-left: 0.5rem !important;
  }

  [data-notes-video-player] .plyr__controls > [data-plyr="play"] {
    grid-column: 2 !important;
  }

  [data-notes-video-player] .plyr__progress__container {
    grid-column: 3 !important;
    max-width: min(100%, 12rem);
  }

  [data-notes-video-player] .plyr__time--current {
    grid-column: 4 !important;
  }

  [data-notes-video-player] .plyr__volume {
    grid-column: 5 !important;
  }

  [data-notes-video-player] .plyr__menu {
    grid-column: 6 !important;
  }

  [data-notes-video-player] .plyr__control[data-plyr="fullscreen"] {
    grid-column: 8 !important;
  }
}

.notes-video-caption-panel {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: #000;
  color: #fff;
}

.notes-video-caption-kicker {
  margin: 0 0 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.notes-video-caption-time {
  margin: 0 0 0.6rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: #fff;
}

.notes-video-caption-text {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 14px;
  background: #000;
  color: #fff;
  font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 2.75em;
  line-height: 1.18;
  letter-spacing: 0.01em;
}

.notes-markdown-body {
  margin: 1.3rem 1.5rem 2rem;
}

#course-screen .course-selection-row + .course-selection-row {
  margin-top: 0.95rem;
}

.course-selection-row {
  display: flex;
  align-items: end;
  gap: 0.85rem;
}

.course-selection-row label {
  flex: 1 1 auto;
  margin: 0;
}

.course-selection-row .btn {
  flex: 0 0 auto;
  min-width: 134px;
  margin-bottom: 1px;
}

.course-selection-row .btn.is-loading {
  position: relative;
  padding-right: 2.5rem;
}

.course-selection-row .btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.85rem;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: -0.475rem;
  border: 2px solid rgba(235, 244, 255, 0.35);
  border-top-color: rgba(235, 244, 255, 0.95);
  border-radius: 50%;
  animation: continue-spinner 0.75s linear infinite;
}

@keyframes continue-spinner {
  to {
    transform: rotate(360deg);
  }
}

.pbq-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.pbq-empty-state,
.pbq-card {
  display: grid;
  gap: 0.85rem;
  border: 1px solid rgba(152, 191, 224, 0.18);
  border-radius: 8px;
  background: rgba(8, 23, 38, 0.74);
  padding: 1rem;
}

.pbq-empty-state h3,
.pbq-card h3 {
  margin: 0 0 0.45rem;
  color: #f5fbff;
}

.pbq-empty-state p,
.pbq-card p {
  margin: 0;
  color: var(--muted);
}

.pbq-card .btn {
  justify-self: start;
}

.course-changelog-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 36, 55, 0.92);
}

.course-changelog-kicker {
  margin: 0 0 0.25rem;
  color: #8ad6d6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-changelog-header h3 {
  margin: 0;
  color: #f5fbff;
}

.course-changelog-status {
  margin: 0;
  color: #a9c0d8;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84rem;
  text-align: right;
}

.course-changelog-viewer {
  max-height: 50vh;
  overflow: auto;
  padding: 1.1rem 1.2rem 1.4rem;
  color: #eef6ff;
}

.course-changelog-viewer h1,
.course-changelog-viewer h2,
.course-changelog-viewer h3,
.course-changelog-viewer h4,
.course-changelog-viewer h5,
.course-changelog-viewer h6 {
  color: #f8fcff;
  line-height: 1.18;
}

.course-changelog-viewer h1 {
  margin-top: 0;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.course-changelog-viewer h2 {
  margin-top: 1.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(152, 191, 224, 0.15);
}

.course-changelog-viewer p,
.course-changelog-viewer li,
.course-changelog-viewer blockquote {
  color: #dcebf9;
}

.course-changelog-viewer a {
  color: #82ddff;
}

.course-changelog-viewer code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95em;
  background: rgba(19, 43, 66, 0.95);
  padding: 0.08rem 0.3rem;
  border-radius: 6px;
}

.course-changelog-viewer pre {
  overflow: auto;
  background: rgba(6, 16, 26, 0.96);
  border: 1px solid rgba(152, 191, 224, 0.16);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.course-changelog-viewer pre code {
  background: transparent;
  padding: 0;
}

.course-changelog-viewer hr {
  border: 0;
  border-top: 1px solid rgba(152, 191, 224, 0.18);
  margin: 1.5rem 0;
}

.course-changelog-viewer blockquote {
  margin: 1rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid rgba(0, 168, 168, 0.65);
}

.notes-screen {
  padding: 1rem;
}

.notes-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.notes-header-top,
.notes-header-bottom {
  display: flex;
  align-items: center;
}

.notes-header-top {
  justify-content: space-between;
  gap: 1rem;
}

.notes-screen-title {
  margin: 0;
  text-align: left;
  font-size: clamp(1.1rem, 2vw, 1.8rem);
}

.notes-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, var(--sidebar-width)) minmax(0, 1fr);
  gap: 1rem;
  min-height: 72vh;
  transition: grid-template-columns 220ms ease;
}

.notes-sidebar-close {
  display: none;
}

.notes-sidebar,
.notes-viewer-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-strong);
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 220ms ease, opacity 180ms ease, visibility 180ms ease;
  transform-origin: left center;
}

.notes-sidebar-header,
.notes-viewer-header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 36, 55, 0.92);
}

.notes-sidebar-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.notes-sidebar-title,
.notes-sidebar-status,
.notes-current-path {
  margin: 0;
}

.notes-sidebar-title {
  color: #f5fbff;
  font-weight: 700;
}

.notes-sidebar-status,
.notes-current-path {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84rem;
}

.notes-tree {
  overflow: auto;
  padding: 0.7rem 0.55rem 0.85rem;
}

.notes-tree-folder {
  margin: 0.08rem 0;
}

.notes-tree-toggle {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: #d7e8fb;
  border-radius: 9px;
  padding: 0.38rem 0.45rem;
  user-select: none;
}

.notes-tree-toggle::before {
  content: "▸";
  display: inline-block;
  width: 1rem;
  color: #8ab6dd;
}

.notes-tree-toggle[aria-expanded="true"]::before {
  content: "▾";
}

.notes-tree-toggle:hover,
.notes-tree-file:hover {
  background: rgba(48, 93, 127, 0.24);
}

.notes-tree-children {
  margin-left: 0.85rem;
  border-left: 1px solid rgba(152, 191, 224, 0.12);
  padding-left: 0.45rem;
}

.notes-tree-file {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #d7e8fb;
  border-radius: 9px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  cursor: pointer;
}

.notes-tree-file.is-active {
  background: linear-gradient(110deg, rgba(0, 168, 168, 0.26), rgba(34, 104, 160, 0.3));
  color: #f5fcff;
}

.notes-viewer-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-sidebar-backdrop {
  display: none;
}

.notes-layout.is-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.notes-layout.is-collapsed .notes-sidebar {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-1.2rem);
  pointer-events: none;
}

body.mobile-notes-layout .notes-layout {
  grid-template-columns: 1fr;
  min-height: auto;
}

body.mobile-notes-layout .notes-header {
  gap: 0.75rem;
}

body.mobile-notes-layout .notes-header-top,
body.mobile-notes-layout .notes-header-bottom {
  width: 100%;
}

body.mobile-notes-layout .notes-sidebar-close {
  display: inline-flex;
}

body.mobile-notes-layout .notes-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: min(88vw, 360px);
  max-width: 100%;
  max-height: min(72vh, 640px);
  z-index: 8;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.36);
  transform: translateX(-110%);
  transition: transform 180ms ease;
}

body.mobile-notes-layout .notes-sidebar-backdrop {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: block;
  background: rgba(3, 10, 18, 0.42);
}

body.mobile-notes-layout .notes-sidebar-backdrop.hidden {
  display: none;
}

.notes-viewer {
  flex: 1;
  overflow: auto;
  padding: 0;
  color: #eef6ff;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notes-empty-state {
  max-width: 42rem;
  margin: 4rem auto;
  text-align: center;
}

.notes-viewer h1,
.notes-viewer h2,
.notes-viewer h3,
.notes-viewer h4,
.notes-viewer h5,
.notes-viewer h6 {
  color: #f8fcff;
  line-height: 1.18;
}

.notes-viewer h1 {
  margin-top: 0;
  font-size: clamp(1.8rem, 2.7vw, 2.7rem);
}

.notes-viewer h2 {
  margin-top: 1.6rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(152, 191, 224, 0.15);
}

.notes-viewer p,
.notes-viewer li,
.notes-viewer blockquote {
  color: #dcebf9;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notes-viewer a {
  color: #82ddff;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notes-viewer code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95em;
  background: rgba(19, 43, 66, 0.95);
  padding: 0.08rem 0.3rem;
  border-radius: 6px;
}

.notes-viewer pre {
  overflow: auto;
  background: rgba(6, 16, 26, 0.96);
  border: 1px solid rgba(152, 191, 224, 0.16);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.notes-viewer pre code {
  background: transparent;
  padding: 0;
}

.notes-viewer hr {
  border: 0;
  border-top: 1px solid rgba(152, 191, 224, 0.18);
  margin: 1.5rem 0;
}

.notes-viewer blockquote {
  margin: 1rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid rgba(0, 168, 168, 0.65);
}

.notes-viewer table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.96rem;
}

.notes-viewer th,
.notes-viewer td {
  border: 1px solid rgba(152, 191, 224, 0.2);
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notes-viewer th {
  background: rgba(18, 42, 64, 0.96);
}

.walkthrough-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.walkthrough-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.walkthrough-spotlight {
  position: fixed;
  top: var(--wt-top, 24px);
  left: var(--wt-left, 24px);
  width: var(--wt-width, 220px);
  height: var(--wt-height, 120px);
  border-radius: 18px;
  border: 2px solid rgba(130, 221, 255, 0.95);
  background: transparent;
  box-shadow:
    0 0 0 8px rgba(0, 168, 168, 0.16),
    0 16px 32px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.walkthrough-card {
  position: fixed;
  top: 24px;
  left: 24px;
  width: min(390px, calc(100vw - 24px));
  background: rgba(8, 21, 34, 0.98);
  border: 1px solid rgba(152, 191, 224, 0.3);
  border-radius: 18px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 26px 44px rgba(0, 0, 0, 0.38);
  pointer-events: auto;
}

.walkthrough-kicker {
  margin: 0 0 0.3rem;
  color: #8ad6d6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.walkthrough-card h3 {
  margin: 0 0 0.45rem;
  color: #f8fcff;
}

.walkthrough-body,
.walkthrough-progress {
  margin: 0.35rem 0 0;
}

.walkthrough-progress {
  color: #a8c4df;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.week-grid label {
  display: flex;
  width: 100%;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(13, 33, 53, 0.75);
  cursor: pointer;
  user-select: none;
}

.week-grid label.is-disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.actions {
  margin-top: 1rem;
}

.push-right {
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  padding: 0.68rem 0.95rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 90ms ease, opacity 90ms ease, background-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn.accent {
  background: linear-gradient(110deg, var(--accent), #0080a8);
  color: #f4ffff;
}

.btn.ghost {
  background: #1b3146;
  color: #deecff;
}

.btn.warn {
  background: linear-gradient(110deg, var(--warn), #a5324f);
  color: #fff3f6;
}

.btn.info {
  background: linear-gradient(110deg, #2e7dff, #1f5fd5);
  color: #eff5ff;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.quiz-config-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.quiz-config-summary-with-grading {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.difficulty-totals-card {
  margin-top: 0.8rem;
  border: 1px solid rgba(152, 191, 224, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 33, 52, 0.94), rgba(8, 24, 38, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.difficulty-totals-title {
  margin: 0;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(152, 191, 224, 0.16);
  color: #f4fbff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
}

.difficulty-totals-table {
  width: 100%;
  border-collapse: collapse;
  color: #deecff;
  font-size: 0.94rem;
}

.difficulty-totals-table th,
.difficulty-totals-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(152, 191, 224, 0.12);
  text-align: left;
  vertical-align: top;
}

.difficulty-totals-table thead th {
  color: #9fd8ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(16, 49, 74, 0.55);
}

.difficulty-totals-table tbody th {
  color: #f5fbff;
  font-weight: 700;
  width: 7rem;
}

.difficulty-totals-table tbody td:last-child {
  color: #8df0db;
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.difficulty-totals-table tbody tr:last-child th,
.difficulty-totals-table tbody tr:last-child td {
  border-bottom: 0;
}

.grading-guide-card {
  height: calc(100% - 0.8rem);
}

.grading-guide-table tbody th {
  width: 10rem;
}

.grading-guide-table tbody td:last-child {
  color: #deecff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.94rem;
  font-weight: 400;
  white-space: normal;
}

label {
  display: block;
  color: #d4e6fb;
}

select,
input[type="number"],
textarea {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.65rem;
  background: #0d2236;
  color: #ebf4ff;
  font-family: "Space Grotesk", sans-serif;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-input-wrap {
  position: relative;
  margin-top: 0.35rem;
}

.number-input-wrap input[type="number"] {
  margin-top: 0;
  padding-right: 4.25rem;
}

.number-stepper {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 3.45rem;
  display: grid;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  border-left: 1px solid rgba(152, 191, 224, 0.2);
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
  background: linear-gradient(180deg, rgba(18, 52, 78, 0.98), rgba(10, 33, 52, 0.98));
}

.number-step-btn {
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 0;
  background: transparent;
  color: #eaf5ff;
  font: 700 1.05rem/1 "Space Grotesk", sans-serif;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.number-step-btn + .number-step-btn {
  border-top: 1px solid rgba(152, 191, 224, 0.16);
}

.number-step-btn:hover {
  background: rgba(0, 168, 168, 0.18);
}

.number-step-btn:active {
  background: rgba(0, 168, 168, 0.28);
}

.number-step-btn:focus-visible {
  outline: 2px solid rgba(130, 221, 255, 0.9);
  outline-offset: -2px;
}

.checkline {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.8rem;
}

.mode-desc {
  margin-top: 0.8rem;
}

.mode-desc-card {
  border: 1px solid rgba(152, 191, 224, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(12, 34, 54, 0.92), rgba(8, 23, 38, 0.98));
  overflow: hidden;
}

.mode-desc-lead {
  margin: 0;
  padding: 0.9rem 1rem 0.8rem;
  color: #eef7ff;
}

.mode-desc-table {
  width: 100%;
  border-collapse: collapse;
  color: #deecff;
  font-size: 0.94rem;
}

.mode-desc-table th,
.mode-desc-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(152, 191, 224, 0.12);
  text-align: left;
  vertical-align: top;
}

.mode-desc-table thead th {
  color: #9fd8ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(16, 49, 74, 0.48);
}

.mode-desc-table tbody th {
  color: #f5fbff;
  font-weight: 700;
  width: 11rem;
}

.mode-desc-table tbody td:nth-child(2) {
  color: #8df0db;
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.question-text {
  color: #f5faff;
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  font-weight: 700;
}

.exam-layout {
  display: block;
}

.exam-layout.is-exam {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.exam-main {
  min-width: 0;
}

.exam-nav-toggle {
  display: none;
  margin-bottom: 0.8rem;
}

.exam-nav {
  position: sticky;
  top: 1rem;
  max-height: 70vh;
  overflow: auto;
  border: 1px solid rgba(152, 191, 224, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 33, 52, 0.96), rgba(8, 24, 38, 0.98));
  padding: 0.85rem;
}

.exam-nav h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

.exam-nav-list {
  display: grid;
  gap: 0.45rem;
}

.exam-nav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(152, 191, 224, 0.18);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #0d2236;
  color: #e8f4ff;
  font: 600 0.9rem/1.25 "Space Grotesk", sans-serif;
  text-align: left;
  cursor: pointer;
}

.exam-nav-item.is-current {
  border-color: rgba(141, 240, 219, 0.75);
  box-shadow: 0 0 0 2px rgba(141, 240, 219, 0.12);
}

.exam-nav-status {
  font-size: 0.78rem;
  font-weight: 800;
}

.exam-nav-status-answered {
  color: #8df0db;
}

.exam-nav-status-unanswered {
  color: #ff8a8f;
}

.exam-nav-status-deferred {
  color: #ffd166;
}

.answers-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0.8rem 0 0;
  padding: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.answers-wrap label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.5rem;
  border-radius: 9px;
}

.answers-wrap label:hover {
  background: rgba(47, 99, 137, 0.25);
}

.feedback {
  min-height: 2.5em;
  white-space: pre-wrap;
}

.score-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.18rem 0.55rem;
  border-radius: 0.35rem;
  font-weight: 700;
  letter-spacing: 0;
}

.score-status-pass {
  color: #062e1d;
  background: #53e59b;
}

.score-status-fail {
  color: #3b0707;
  background: #ff7b7b;
}

#review-text {
  margin-top: 0.65rem;
  min-height: 390px;
  white-space: pre;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1d31;
  color: var(--ink);
  width: min(700px, 92vw);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog-form h3 {
  margin-top: 0;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

@keyframes rise-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(calc(var(--drift-start, 0) * 1vw), -16vh, 0);
  }
  100% {
    transform: translate3d(calc(var(--drift-end, 0) * 1vw), 112vh, 0);
  }
}

@keyframes confetti-spin {
  0% {
    transform: rotate(0deg) rotateY(0deg) rotateX(0deg) scale(0.9);
  }
  25% {
    transform: rotate(calc(var(--turn-direction, 1) * 80deg)) rotateY(180deg) rotateX(120deg) scale(1);
  }
  50% {
    transform: rotate(calc(var(--turn-direction, 1) * 180deg)) rotateY(360deg) rotateX(240deg) scale(0.86);
  }
  75% {
    transform: rotate(calc(var(--turn-direction, 1) * 280deg)) rotateY(540deg) rotateX(320deg) scale(1.04);
  }
  100% {
    transform: rotate(calc(var(--turn-direction, 1) * 360deg)) rotateY(720deg) rotateX(480deg) scale(0.92);
  }
}

@media (max-width: 1200px) {
  .mode-card-grid,
  .config-grid,
  .week-grid,
  .notes-layout {
    grid-template-columns: 1fr;
  }

  .notes-layout {
    min-height: auto;
  }

  .course-changelog-header {
    align-items: start;
    flex-direction: column;
  }

  .course-changelog-status {
    text-align: left;
  }

  .app-header-top {
    align-items: center;
  }

  .app-menu-toggle {
    min-width: 3.25rem;
    width: 3.25rem;
    padding-inline: 0.75rem;
    justify-content: center;
  }

  .app-menu-toggle-label {
    display: none;
  }

  .hamburger-menu {
    display: inline-flex;
  }

  .walkthrough-card {
    width: calc(100vw - 24px);
  }
}

.notes-sidebar.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

@media (max-width: 900px) {
  .config-grid {
    grid-template-columns: 1fr;
  }

  .quiz-config-summary-with-grading {
    grid-template-columns: minmax(0, 1fr);
  }

  .grading-guide-card {
    height: auto;
  }

  .exam-layout.is-exam {
    grid-template-columns: 1fr;
  }

  .exam-nav-toggle {
    display: inline-flex;
  }

  .exam-nav {
    position: static;
    max-height: 18rem;
    margin-bottom: 1rem;
  }

  .exam-nav.exam-nav-mobile-closed {
    display: none;
  }

  .difficulty-totals-table thead {
    display: none;
  }

  .difficulty-totals-table,
  .difficulty-totals-table tbody,
  .difficulty-totals-table tr,
  .difficulty-totals-table th,
  .difficulty-totals-table td {
    display: block;
    width: 100%;
  }

  .difficulty-totals-table tbody tr {
    padding: 0.15rem 0;
    border-bottom: 1px solid rgba(152, 191, 224, 0.12);
  }

  .difficulty-totals-table tbody tr:last-child {
    border-bottom: 0;
  }

  .difficulty-totals-table th,
  .difficulty-totals-table td {
    border-bottom: 0;
    padding: 0.35rem 1rem;
  }

  .difficulty-totals-table tbody th {
    padding-top: 0.8rem;
  }

  .difficulty-totals-table tbody td:last-child {
    padding-bottom: 0.8rem;
  }

  .mode-desc-table thead {
    display: none;
  }

  .mode-desc-table,
  .mode-desc-table tbody,
  .mode-desc-table tr,
  .mode-desc-table th,
  .mode-desc-table td {
    display: block;
    width: 100%;
  }

  .mode-desc-table tbody tr {
    padding: 0.15rem 0;
    border-top: 1px solid rgba(152, 191, 224, 0.12);
  }

  .mode-desc-table th,
  .mode-desc-table td {
    border-top: 0;
    padding: 0.35rem 1rem;
  }

  .mode-desc-table tbody th {
    padding-top: 0.8rem;
  }

  .mode-desc-table tbody td:last-child {
    padding-bottom: 0.8rem;
  }

  .course-selection-row {
    flex-direction: column;
    align-items: stretch;
  }

  .course-selection-row .btn {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
  }

  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .push-right {
    margin-left: 0;
  }

  .btn {
    width: 100%;
  }

  #week-screen .week-actions {
    align-items: center;
    justify-content: flex-start;
  }

  #week-screen .week-actions .btn {
    width: auto;
    flex: 0 0 auto;
  }

  #quiz-screen .actions {
    align-items: stretch;
  }

  #quiz-screen .actions .btn {
    width: auto;
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 9rem;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  body {
    margin: 0 !important;
    min-height: auto !important;
    background: #fff !important;
    color: #000 !important;
  }

  .bg-shape,
  .startup-splash,
  .results-confetti,
  .app-header,
  #course-screen,
  #week-screen,
  #config-screen,
  #quiz-screen,
  dialog {
    display: none !important;
  }

  .app-shell {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #review-screen {
    display: block !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
    animation: none !important;
  }

  #review-screen .actions {
    display: none !important;
  }

  #review-screen p {
    color: #000 !important;
  }

  #review-text {
    display: none !important;
  }

  #review-screen,
  #review-rich-text {
    page-break-inside: auto;
    break-inside: auto;
  }
}
